[OpenWrt-Devel] [PATCH openwrt 1/3] hostapd: Always isolate if brport->multicast_to_unicast is enabled
Felix Fietkau
nbd at openwrt.org
Wed Jul 8 08:31:03 EDT 2015
On 2015-06-18 17:23, Linus Lüssing wrote:
> 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 | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
> index 23d2e7e..74b2d02 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))"
> @@ -176,6 +179,9 @@ hostapd_set_bss_options() {
> local bss_conf
> local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wpa_key_mgmt
>
> + local bridge_section=""
> + local mcast_to_ucast="1"
> +
> json_get_vars \
> wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \
> maxassoc max_inactivity disassoc_low_ack isolate auth_cache \
> @@ -193,9 +199,18 @@ hostapd_set_bss_options() {
> set_default wmm 1
> set_default uapsd 1
>
> + if [ -n "$network_bridge" ]; then
> + bridge_section="$(find_config $network_bridge)"
> + fi
> + if [ -n "$bridge_section" ]; then
> + mcast_to_ucast="$(uci_get_state network $bridge_section mcast_to_ucast 1)"
> + fi
I really don't like the use of uci here. I think the information of
whether ap_isolate needs to be enabled should be passed from netifd to
this script in the json data.
- Felix
_______________________________________________
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