7 # psk-mixed/tkip => WPA1+2 PSK, TKIP
8 # wpa-psk2/tkip+aes => WPA2 PSK, CCMP+TKIP
9 # wpa2/tkip+aes => WPA2 RADIUS, CCMP+TKIP
12 # TODO: move this parsing function somewhere generic, so that
13 # later it can be reused by drivers that don't use hostapd
15 # crypto defaults: WPA2 vs WPA1
17 wpa2
*|WPA2
*|
*PSK2
*|
*psk2
*)
31 # explicit override for crypto setting
33 *tkip
+aes|
*TKIP
+AES|
*tkip
+ccmp|
*TKIP
+CCMP
) crypto
="CCMP TKIP";;
34 *tkip|
*TKIP
) crypto
="TKIP";;
35 *aes|
*AES|
*ccmp|
*CCMP
) crypto
="CCMP";;
38 # use crypto/auth settings for building the hostapd config
41 config_get psk
"$vif" key
42 append hostapd_cfg
"wpa_passphrase=$psk" "$N"
45 # FIXME: add wpa+radius here
51 config_get ifname
"$vif" ifname
52 config_get bridge
"$vif" bridge
53 config_get ssid
"$vif" ssid
54 cat > /var
/run
/hostapd-
$ifname.conf
<<EOF
57 ${bridge:+bridge=$bridge}
64 hostapd
-B /var
/run
/hostapd-
$ifname.conf
This page took 0.051693 seconds and 5 git commands to generate.