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 # required fields? formats?
46 # hostapd is particular, maybe a default configuration for failures
47 config_get server
"$vif" server
48 append hostapd_cfg
"auth_server_addr=$server" "$N"
49 config_get port
"$vif" port
51 append hostapd_cfg
"auth_server_port=$port" "$N"
52 config_get secret
"$vif" key
53 append hostapd_cfg
"auth_server_shared_secret=$secret" "$N"
54 config_get nasid
"$vif" nasid
55 append hostapd_cfg
"nas_identifier=$nasid" "$N"
56 append hostapd_cfg
"eapol_key_index_workaround=1" "$N"
57 append hostapd_cfg
"radius_acct_interim_interval=300" "$N"
58 append hostapd_cfg
"ieee8021x=1" "$N"
59 append hostapd_cfg
"auth_algs=1" "$N"
60 append hostapd_cfg
"wpa_key_mgmt=WPA-EAP" "$N"
61 append hostapd_cfg
"wpa_group_rekey=300" "$N"
62 append hostapd_cfg
"wpa_gmk_rekey=640" "$N"
68 config_get ifname
"$vif" ifname
69 config_get bridge
"$vif" bridge
70 config_get ssid
"$vif" ssid
71 cat > /var
/run
/hostapd-
$ifname.conf
<<EOF
74 ${bridge:+bridge=$bridge}
81 hostapd
-B /var
/run
/hostapd-
$ifname.conf
This page took 0.0484 seconds and 5 git commands to generate.