Seeking to enable MAC filtering in hardware on a WNDR3700. I found:
https://forum.openwrt.org/viewtopic.php … 91#p116291
but it doesn't seem to have made its way onto:
https://dev.openwrt.org/browser/trunk/p … hostapd.sh
Here's the patch again (BB seems to lose the tabs):
--- hostapd.sh.bak 2010-12-19 03:56:49.000000000 -0800
+++ hostapd.sh 2010-12-26 11:53:53.000000000 -0800
@@ -14,6 +14,31 @@
append "$var" "ap_isolate=$ap_isolate" "$N"
fi
+ config_get ifname "$vif" ifname
+ local macfile="/var/run/hostapd-${phy}-${ifname}-mac"
+ config_get macfilter "$vif" macfilter
+ config_get maclist "$vif" maclist
+ test -e $macfile.* && rm -f $macfile.*
+ case "$macfilter" in
+ allow|2)
+ append "$var" "macaddr_acl=1" "$N"
+ for mac in $maclist; do
+ echo "$mac" >> $macfile.allow
+ done
+ append "$var" "accept_mac_file=$macfile.allow" "$N"
+ ;;
+ deny|1)
+ append "$var" "macaddr_acl=0" "$N"
+ for mac in $maclist; do
+ echo "$mac" >> $macfile.deny
+ done
+ append "$var" "deny_mac_file=$macfile.deny" "$N"
+ ;;
+ radius|3)
+ append "$var" "macaddr_acl=3" "$N"
+ ;;
+ esac
+
# Examples:
# psk-mixed/tkip => WPA1+2 PSK, TKIP
# wpa-psk2/tkip+aes => WPA2 PSK, CCMP+TKIP