From 9eacd21000c25da72cd5d6938a38a1e1106ca384 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 26 Jan 2011 11:33:54 +0000 Subject: mac80211: Add mac address filter configuration for hostapd Add support of mac address filter. Now 'macfilter' and 'maclist' options can be used with mac80211. Patch from: kentarou matsuyama git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25105 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/mac80211/files/lib/wifi/mac80211.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'package/mac80211/files') diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index b20785cf67..251c2f13d8 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -6,6 +6,9 @@ mac80211_hostapd_setup_base() { local ifname="$2" cfgfile="/var/run/hostapd-$phy.conf" + macfile="/var/run/hostapd-$phy.maclist" + [ -e "$macfile" ] && rm -f "$macfile" + config_get device "$vif" device config_get country "$device" country config_get hwmode "$device" hwmode @@ -30,7 +33,25 @@ mac80211_hostapd_setup_base() { [ -n "$ht_capab" ] && append base_cfg "ht_capab=$ht_capab" "$N" } } - cat > "$cfgfile" <> $macfile + done + } + cat >> "$cfgfile" <