mirror of https://github.com/aredn/aredn.git
aredn: enable wan wifi client to connect to an open AP
This commit is contained in:
parent
9967d0f978
commit
f81c129dae
|
@ -44,7 +44,9 @@ dropdir=${1-/etc/config}
|
|||
configfile=/etc/config.mesh/_setup
|
||||
while read -r line; do
|
||||
if [ -n "$line" -a -z "${line##wifi*}" ]; then
|
||||
eval ${line%% =*}="\"${line##*= }"\"
|
||||
value="${line##*= }"
|
||||
value="${value##*=}"
|
||||
eval ${line%% =*}="\"$value"\"
|
||||
fi
|
||||
done < $configfile
|
||||
|
||||
|
@ -136,10 +138,15 @@ for _dev in /sys/class/ieee80211/*; do
|
|||
ssid=$(echo -e "${ssid}")
|
||||
ssid=${ssid//\"/\\\"}
|
||||
mode="sta"
|
||||
encryption="psk2"
|
||||
key=$(echo "${wifi3_key}" | sed -e 's/\(..\)/\\x\1/g')
|
||||
key=$(echo -e "${key}")
|
||||
key=${key//\"/\\\"}
|
||||
if [ -z "$wifi3_key" ]; then
|
||||
encryption="none"
|
||||
key=""
|
||||
else
|
||||
encryption="psk2"
|
||||
key=$(echo "${wifi3_key}" | sed -e 's/\(..\)/\\x\1/g')
|
||||
key=$(echo -e "${key}")
|
||||
key=${key//\"/\\\"}
|
||||
fi
|
||||
network="wan"
|
||||
htmode=""
|
||||
uci -c ${dropdir} -q batch > /dev/null <<-EOF
|
||||
|
|
|
@ -452,9 +452,9 @@ if($parms{button_save})
|
|||
{
|
||||
push (@errors, "LAN Access Point Password must be at least 8 characters, up to 64");
|
||||
}
|
||||
if( "$wifi3_enable" eq "1" and length($wifi3_key) > 64)
|
||||
if( "$wifi3_enable" eq "1" and (length( $wifi3_key ) < 8 or length($wifi3_key) > 64) and ! length($wifi3_key) == 0)
|
||||
{
|
||||
push (@errors, "WAN Wifi Client Password must not be greater than 64 characters");
|
||||
push (@errors, "WAN Wifi Client Password must be between 8 and 64 characters");
|
||||
}
|
||||
if( "$wifi2_enable" eq "1" and ( $wifi2_key =~ /\'/ or $wifi2_ssid =~ /\'/ ))
|
||||
{
|
||||
|
|
|
@ -530,8 +530,9 @@ The WAN Wifi Client feature enables connecting the mesh node to the Internet or
|
|||
available on a wifi Access Point. Enabling the WAN Wifi Client will disable vlan1
|
||||
and access to the Internet over the physical Ethernet port. Type in the SSID and password
|
||||
to connect to. If the device is dual-band, e.g. an hAP a lite, the band option will be
|
||||
shown.<br><br>The password key length must not be greater than 64 characters. If the key
|
||||
lenght is 64, it is treated as hex encoded. A single quote character
|
||||
shown.<br><br>The password key length must be a minimum of 8 and maximum of 64 characters.
|
||||
If the key length is 64, it is treated as hex encoded. if the key length is 0, then no
|
||||
encryption will be used to connect to an open AP. A single quote character
|
||||
may not be used.</p>
|
||||
</p>
|
||||
<hr width=500>
|
||||
|
|
Loading…
Reference in New Issue