wireless: fix bogus isolate setting on unbridged configuration
authorFelix Fietkau <nbd@openwrt.org>
Sat, 26 Sep 2015 23:15:22 +0000 (01:15 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 26 Sep 2015 23:15:23 +0000 (01:15 +0200)
This was caused by a faulty test for the isolate option (arithmetic on a
variable with no default)

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
scripts/netifd-wireless.sh

index 83a8223..d5f3867 100644 (file)
@@ -254,10 +254,8 @@ _wireless_set_brsnoop_isolation() {
 
        json_get_var isolate isolate
 
-       [ $isolate -gt 0 -o -z "$network_bridge" ] && return
-
-       [ -z "$multicast_to_unicast" ] && multicast_to_unicast=1
-       [ $multicast_to_unicast -gt 0 ] && json_add_boolean isolate 1
+       [ ${isolate:-0} -gt 0 -o -z "$network_bridge" ] && return
+       [ ${multicast_to_unicast:-1} -gt 0 ] && json_add_boolean isolate 1
 }
 
 for_each_interface() {