diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-11-08 14:22:56 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-11-08 14:22:56 +0000 |
commit | 51f0f920a86889afc951135cf7421131a7496202 (patch) | |
tree | 32456f365b021ff17314a10592854ddb063de389 /package/hostapd/files | |
parent | a94c88d3c506f8480fefd2c14ae1f4e8be5a737a (diff) |
[package] hostapd: add code to prevent accidentally bridging non-wds sta mode interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28858 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd/files')
-rw-r--r-- | package/hostapd/files/wpa_supplicant.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/package/hostapd/files/wpa_supplicant.sh b/package/hostapd/files/wpa_supplicant.sh index 6112517f3..1ab6c663e 100644 --- a/package/hostapd/files/wpa_supplicant.sh +++ b/package/hostapd/files/wpa_supplicant.sh @@ -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' |