mac80211, hostapd: Fix macfilter for multi bssid setups
Previously only the first macfilter configuration would have been used on all interfaces. However, the configuration was always done per vif already. Hence, move the macfilter setup into hostapd.sh where and create one mac list file per vif. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 34470
This commit is contained in:
@@ -210,6 +210,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() {
|
||||
|
||||
Reference in New Issue
Block a user