Do not allow user to use `phyX' of the interface
This commit is contained in:
parent
3f49258758
commit
fd75f56635
@ -364,7 +364,7 @@ fi
|
|||||||
|
|
||||||
WIFI_IFACE=$1
|
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
|
echo "ERROR: ${WIFI_IFACE} is not a WiFi interface" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -442,7 +442,7 @@ echo "Config dir: $CONFDIR"
|
|||||||
|
|
||||||
if [[ $NO_VIRT -eq 0 ]]; then
|
if [[ $NO_VIRT -eq 0 ]]; then
|
||||||
VWIFI_IFACE=${WIFI_IFACE}ap
|
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
|
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."
|
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."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user