mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
adding support of WPA3 Transition Mode
This commit is contained in:
parent
75f48a929b
commit
41ebe2b574
@ -1730,21 +1730,40 @@ if [[ $IEEE80211N -eq 1 ]] || [[ $IEEE80211AC -eq 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$PASSPHRASE" ]]; then
|
if [[ -n "$PASSPHRASE" ]]; then
|
||||||
[[ "$WPA_VERSION" == "1+2" ]] && WPA_VERSION=3
|
if [[ "$WPA_VERSION" == "1+2" ]]; then
|
||||||
|
WPA_VERSION=2 # Assuming you want to default to WPA2 for the "1+2" setting
|
||||||
|
fi
|
||||||
if [[ $USE_PSK -eq 0 ]]; then
|
if [[ $USE_PSK -eq 0 ]]; then
|
||||||
WPA_KEY_TYPE=passphrase
|
WPA_KEY_TYPE=passphrase
|
||||||
else
|
else
|
||||||
WPA_KEY_TYPE=psk
|
WPA_KEY_TYPE=psk
|
||||||
fi
|
fi
|
||||||
cat << EOF >> $CONFDIR/hostapd.conf
|
|
||||||
|
if [[ "$WPA_VERSION" == "3" ]]; then
|
||||||
|
# Configuring for WPA3 Transition Mode
|
||||||
|
# 80211w must be 1 or Apple Devices will not connect.
|
||||||
|
# 1 is the only valid value for WPA3 Transition Mode
|
||||||
|
cat << EOF >> $CONFDIR/hostapd.conf
|
||||||
|
wpa=2
|
||||||
|
wpa_${WPA_KEY_TYPE}=${PASSPHRASE}
|
||||||
|
wpa_key_mgmt=WPA-PSK SAE
|
||||||
|
wpa_pairwise=CCMP
|
||||||
|
rsn_pairwise=CCMP
|
||||||
|
ieee80211w=1
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
# Original configuration for WPA_VERSION other than 3
|
||||||
|
cat << EOF >> $CONFDIR/hostapd.conf
|
||||||
wpa=${WPA_VERSION}
|
wpa=${WPA_VERSION}
|
||||||
wpa_${WPA_KEY_TYPE}=${PASSPHRASE}
|
wpa_${WPA_KEY_TYPE}=${PASSPHRASE}
|
||||||
wpa_key_mgmt=WPA-PSK
|
wpa_key_mgmt=WPA-PSK
|
||||||
wpa_pairwise=CCMP
|
wpa_pairwise=CCMP
|
||||||
rsn_pairwise=CCMP
|
rsn_pairwise=CCMP
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ "$SHARE_METHOD" == "bridge" ]]; then
|
if [[ "$SHARE_METHOD" == "bridge" ]]; then
|
||||||
echo "bridge=${BRIDGE_IFACE}" >> $CONFDIR/hostapd.conf
|
echo "bridge=${BRIDGE_IFACE}" >> $CONFDIR/hostapd.conf
|
||||||
elif [[ $NO_DNSMASQ -eq 0 ]]; then
|
elif [[ $NO_DNSMASQ -eq 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user