[openwrt/openwrt] hostapd: ubus: fix infinite loop when configuring RRM NR

LEDE Commits lede-commits at lists.infradead.org
Mon Sep 21 15:28:19 EDT 2020


blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d643b10a76965a94684012d2ddf36e2bcc146274

commit d643b10a76965a94684012d2ddf36e2bcc146274
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Mon Sep 21 09:18:27 2020 +0200

    hostapd: ubus: fix infinite loop when configuring RRM NR
    
    The return-code was set, however it was never returned, nor was
    the loop interrupted.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 package/network/services/hostapd/Makefile          | 2 +-
 package/network/services/hostapd/src/src/ap/ubus.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 887c15fd40..ceb6014c4b 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 293296d92c..9dd263837f 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -849,7 +849,6 @@ hostapd_rrm_nr_set(struct ubus_context *ctx, struct ubus_object *obj,
 	struct blob_attr *tb_l[__NR_SET_LIST_MAX];
 	struct blob_attr *tb[ARRAY_SIZE(nr_e_policy)];
 	struct blob_attr *cur;
-	int ret = 0;
 	int rem;
 
 	hostapd_rrm_nr_enable(hapd);
@@ -888,7 +887,7 @@ hostapd_rrm_nr_set(struct ubus_context *ctx, struct ubus_object *obj,
 		continue;
 
 invalid:
-		ret = UBUS_STATUS_INVALID_ARGUMENT;
+		return UBUS_STATUS_INVALID_ARGUMENT;
 	}
 
 	return 0;



More information about the lede-commits mailing list