diff options
author | Daniel Golle <daniel@makrotopia.org> | 2020-01-22 14:14:14 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-01-22 14:22:17 +0200 |
commit | 3d6c571083d324567ec1a9c4fcac1712e7d2e42a (patch) | |
tree | 3e5c915b15d8066c919575675f74414792bf0e20 /package/kernel | |
parent | 947163b9d28db96923f91301d2289ec195a3f61f (diff) | |
download | upstream-3d6c571083d324567ec1a9c4fcac1712e7d2e42a.tar.gz upstream-3d6c571083d324567ec1a9c4fcac1712e7d2e42a.tar.bz2 upstream-3d6c571083d324567ec1a9c4fcac1712e7d2e42a.zip |
mac80211: add support for wds_bridge hostapd feature
hostapd allows putting WDS (4addr mode) clients into a separate bridge
other than the bridge regular (3addr mode) clients end up in. This is
useful for example giving WDS clients access to several VLANs
(trunking) while regular clients will end up inside a specific VLAN.
Add 'wds_bridge' config parameter for wifi-iface which contains the
name of the bridge. hostapd-mini already supports this feature, so all
needed is to add the UCI wrapping in mac80211.sh.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 7ac0ce8aac..d6f460b932 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -62,6 +62,7 @@ drv_mac80211_init_iface_config() { config_add_string 'macaddr:macaddr' ifname config_add_boolean wds powersave enable + config_add_string wds_bridge config_add_int maxassoc config_add_int max_listen_int config_add_int dtim_period @@ -340,12 +341,15 @@ mac80211_hostapd_setup_bss() { append hostapd_cfg "$type=$ifname" "$N" hostapd_set_bss_options hostapd_cfg "$vif" || return 1 - json_get_vars wds dtim_period max_listen_int start_disabled + json_get_vars wds wds_bridge dtim_period max_listen_int start_disabled set_default wds 0 set_default start_disabled 0 - [ "$wds" -gt 0 ] && append hostapd_cfg "wds_sta=1" "$N" + [ "$wds" -gt 0 ] && { + append hostapd_cfg "wds_sta=1" "$N" + [ -n "$wds_bridge" ] && append hostapd_cfg "wds_bridge=$wds_bridge" "$N" + } [ "$staidx" -gt 0 -o "$start_disabled" -eq 1 ] && append hostapd_cfg "start_disabled=1" "$N" cat >> /var/run/hostapd-$phy.conf <<EOF |