diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-05-21 11:56:27 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-05-21 11:56:27 +0000 |
commit | b4fe48f75e7530d81cb90e58bc003fb655c036aa (patch) | |
tree | 684da747e1c52cc3d260a716bb26e1a94f602f33 /package/hostapd/files/hostapd.sh | |
parent | 56130bc5a8469bda1963b134a2bdeec7588b5a28 (diff) | |
download | upstream-b4fe48f75e7530d81cb90e58bc003fb655c036aa.tar.gz upstream-b4fe48f75e7530d81cb90e58bc003fb655c036aa.tar.bz2 upstream-b4fe48f75e7530d81cb90e58bc003fb655c036aa.zip |
hostapd: sync with trunk r36533
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36682 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd/files/hostapd.sh')
-rw-r--r-- | package/hostapd/files/hostapd.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh index d60c26f3c6..00c6a094cf 100644 --- a/package/hostapd/files/hostapd.sh +++ b/package/hostapd/files/hostapd.sh @@ -12,6 +12,7 @@ hostapd_set_bss_options() { config_get_bool disassoc_low_ack "$vif" disassoc_low_ack 1 config_get max_num_sta "$vif" max_num_sta 0 config_get max_inactivity "$vif" max_inactivity 0 + config_get_bool preamble "$vif" short_preamble 1 config_get device "$vif" device config_get hwmode "$device" hwmode @@ -29,6 +30,9 @@ hostapd_set_bss_options() { append "$var" "ap_max_inactivity=$max_inactivity" "$N" fi append "$var" "disassoc_low_ack=$disassoc_low_ack" "$N" + if [ "$preamble" -gt 0 ]; then + append "$var" "preamble=$preamble" "$N" + fi # Examples: # psk-mixed/tkip => WPA1+2 PSK, TKIP @@ -210,6 +214,27 @@ hostapd_set_bss_options() { ;; esac fi + + config_get macfilter "$vif" macfilter + macfile="/var/run/hostapd-$ifname.maclist" + [ -e "$macfile" ] && rm -f "$macfile" + + case "$macfilter" in + allow) + append "$var" "macaddr_acl=1" "$N" + append "$var" "accept_mac_file=$macfile" "$N" + ;; + deny) + append "$var" "macaddr_acl=0" "$N" + append "$var" "deny_mac_file=$macfile" "$N" + ;; + esac + config_get maclist "$vif" maclist + [ -n "$maclist" ] && { + for mac in $maclist; do + echo "$mac" >> $macfile + done + } } hostapd_set_log_options() { |