mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
hostapd: add code to prevent accidentally bridging non-wds sta mode interfaces
SVN-Revision: 28858
This commit is contained in:
parent
b6aef59ea8
commit
ec20b84048
@ -23,6 +23,15 @@ wpa_supplicant_setup_vif() {
|
||||
config_set "$vif" bridge "$bridge"
|
||||
}
|
||||
|
||||
local mode ifname wds
|
||||
config_get mode "$vif" mode
|
||||
config_get ifname "$vif" ifname
|
||||
config_get_bool wds "$vif" wds 0
|
||||
[ -z "$bridge" ] || [ "$mode" = ap ] || [ "$mode" = sta -a $wds -eq 1 ] || {
|
||||
echo "wpa_supplicant_setup_vif($ifname): Refusing to bridge $mode mode interface"
|
||||
return 1
|
||||
}
|
||||
|
||||
case "$enc" in
|
||||
*none*)
|
||||
key_mgmt='NONE'
|
||||
|
Loading…
Reference in New Issue
Block a user