diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-07-26 10:02:59 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-07-26 10:02:59 +0000 |
commit | 2b073b7b7371ec32d0a94240158d6f15340d3bd7 (patch) | |
tree | 09a1febd958f6404cf05c416de222b3b98c947c5 /package/kernel/mac80211/files | |
parent | a22105f7ce571a13cdef869ff29c1df350b4780c (diff) | |
download | upstream-2b073b7b7371ec32d0a94240158d6f15340d3bd7.tar.gz upstream-2b073b7b7371ec32d0a94240158d6f15340d3bd7.tar.bz2 upstream-2b073b7b7371ec32d0a94240158d6f15340d3bd7.zip |
authsae: adapt uci scripts to use authsae
This patch modifies the uci scripts to be able to
start meshd-nl80211 for encrypted mesh networks,
therefor a new script (authsae.sh) is inserted.
Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
[etienne.champetier@free.fr: just update mac80211.sh path]
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37554 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/files')
-rw-r--r-- | package/kernel/mac80211/files/lib/wifi/mac80211.sh | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh index 20f6bfa93c..fb6cd29676 100644 --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh @@ -251,7 +251,7 @@ disable_mac80211() ( include /lib/network for wdev in $(list_phy_interfaces "$phy"); do [ -f "/var/run/$wdev.pid" ] && kill $(cat /var/run/$wdev.pid) >&/dev/null 2>&1 - for pid in `pidof wpa_supplicant`; do + for pid in `pidof wpa_supplicant meshd-nl80211`; do grep "$wdev" /proc/$pid/cmdline >/dev/null && \ kill $pid done @@ -370,8 +370,13 @@ enable_mac80211() { [ "$apidx" -gt 1 ] || iw phy "$phy" interface add "$ifname" type managed ;; mesh) - config_get mesh_id "$vif" mesh_id - iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id" + config_get key "$vif" key "" + if [ -n "$key" ]; then + iw phy "$phy" interface add "$ifname" type mp + else + config_get mesh_id "$vif" mesh_id + iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id" + fi ;; monitor) iw phy "$phy" interface add "$ifname" type monitor @@ -426,9 +431,16 @@ enable_mac80211() { rm -f /var/run/hostapd-$phy.conf for vif in $vifs; do config_get mode "$vif" mode - [ "$mode" = "ap" ] || continue - mac80211_hostapd_setup_bss "$phy" "$vif" - start_hostapd=1 + case "$mode" in + ap) + mac80211_hostapd_setup_bss "$phy" "$vif" + start_hostapd=1 + ;; + mesh) + config_get key "$vif" key "" + [ -n "$key" ] && authsae_start_interface "$device" "$vif" + ;; + esac done [ -n "$start_hostapd" ] && { |