create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap
Log | Files | Refs | README | LICENSE

commit fd75f5663507a2331c9471fa4bf1e6a045c5bee3
parent 3f492587586b9f13f6f3f82d88f64beaf6c779df
Author: oblique <psyberbits@gmail.com>
Date:   Thu, 28 Aug 2014 08:40:15 +0300

Do not allow user to use `phyX' of the interface

Diffstat:
Mcreate_ap | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/create_ap b/create_ap @@ -364,7 +364,7 @@ fi WIFI_IFACE=$1 -if ! iw ${WIFI_IFACE} info > /dev/null 2>&1; then +if ! iw dev ${WIFI_IFACE} info > /dev/null 2>&1; then echo "ERROR: ${WIFI_IFACE} is not a WiFi interface" >&2 exit 1 fi @@ -442,7 +442,7 @@ echo "Config dir: $CONFDIR" if [[ $NO_VIRT -eq 0 ]]; then VWIFI_IFACE=${WIFI_IFACE}ap - WIFI_IFACE_CHANNEL=$(iw ${WIFI_IFACE} info | grep channel | awk '{print $2}') + WIFI_IFACE_CHANNEL=$(iw dev ${WIFI_IFACE} info | grep channel | awk '{print $2}') if [[ -n $WIFI_IFACE_CHANNEL && $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then echo "hostapd will fail to use channel $CHANNEL because $WIFI_IFACE is already set to channel $WIFI_IFACE_CHANNEL, fallback to channel $WIFI_IFACE_CHANNEL."