diff --git a/create_ap b/create_ap index f26e5f9..c023dce 100755 --- a/create_ap +++ b/create_ap @@ -42,7 +42,7 @@ usage() { echo " 'none' for no Internet sharing (equivalent to -n)" echo " --psk Use 64 hex digits pre-shared-key instead of passphrase" echo " --hidden Make the Access Point hidden (do not broadcast the SSID)" - echo " --mac-filter Enable MAC address filtering (addresses can be added to /etc/hostapd/accept)" + echo " --mac-filter Enable MAC address filtering (addresses can be added to /etc/hostapd/hostapd.accept)" echo " --redirect-to-localhost If -n is set, redirect every web request to localhost (useful for public information networks)" echo " --hostapd-debug With level between 1 and 2, passes arguments -d or -dd to hostapd for debugging." echo " --isolate-clients Disable communication between clients" @@ -1571,7 +1571,6 @@ channel=${CHANNEL} ctrl_interface=$CONFDIR/hostapd_ctrl ctrl_interface_group=0 ignore_broadcast_ssid=$HIDDEN -macaddr_acl=${MAC_FILTER} ap_isolate=$ISOLATE_CLIENTS EOF @@ -1588,6 +1587,13 @@ else echo "hw_mode=a" >> $CONFDIR/hostapd.conf fi +if [[ -n $MAC_FILTER ]]; then + cat << EOF >> $CONFDIR/hostapd.conf +macaddr_acl=${MAC_FILTER} +accept_mac_file=/etc/hostapd/hostapd.accept +EOF +fi + if [[ $IEEE80211N -eq 1 ]]; then cat << EOF >> $CONFDIR/hostapd.conf ieee80211n=1