[OpenWrt-Devel] [PATCHv2 openwrt 1/3] hostapd: Always isolate if brport->multicast_to_unicast is enabled
Linus Lüssing
linus.luessing at c0d3.blue
Tue Aug 4 19:00:06 EDT 2015
For the multicast-to-unicast feature of a bridge to function correctly,
it is necessary that all STAs are always isolated on the AP level. The
bridge will take care of reflecting packets back to the AP interface
if necessary and/or no STA isolation wanted by using the hairpin feature
of the bridge.
Signed-off-by: Linus Lüssing <linus.luessing at c0d3.blue>
---
package/network/services/hostapd/files/netifd.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index a3ffd93..b987a63 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -1,3 +1,6 @@
+. /lib/network/config.sh
+. /lib/config/uci.sh
+
wpa_supplicant_add_rate() {
local var="$1"
local val="$(($2 / 1000))"
@@ -194,9 +197,15 @@ hostapd_set_bss_options() {
set_default uapsd 1
append bss_conf "ctrl_interface=/var/run/hostapd"
+
+ [ -n "$multicast_to_unicast" ] || multicast_to_unicast=1
+
if [ "$isolate" -gt 0 ]; then
append bss_conf "ap_isolate=$isolate" "$N"
+ elif [ -n "$network_bridge" -a $multicast_to_unicast -gt 0 ]; then
+ append bss_conf "ap_isolate=1" "$N"
fi
+
if [ "$maxassoc" -gt 0 ]; then
append bss_conf "max_num_sta=$maxassoc" "$N"
fi
--
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list