hostapd: ubus: fix infinite loop when configuring RRM NR
authorDavid Bauer <mail@david-bauer.net>
Mon, 21 Sep 2020 07:18:27 +0000 (09:18 +0200)
committerDavid Bauer <mail@david-bauer.net>
Mon, 21 Sep 2020 19:27:56 +0000 (21:27 +0200)
The return-code was set, however it was never returned, nor was
the loop interrupted.

Signed-off-by: David Bauer <mail@david-bauer.net>
package/network/services/hostapd/Makefile
package/network/services/hostapd/src/src/ap/ubus.c

index 887c15fd408d2c483edf9de837651e9ea6908839..ceb6014c4beac509ca4da0d8f1dd35d992f06d8e 100644 (file)
@@ -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
index 293296d92c579452151c6c579f511956bb499747..9dd263837f48549f7b9154006b894bec75b2bffb 100644 (file)
@@ -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;