OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
Line 35... | Line 35... | |||
35 | ;; |
35 | ;; |
|
36 | esac |
36 | esac |
|
37 | } |
37 | } |
|
Line 38... | Line 38... | |||
38 | |
38 | |
|
39 | hostapd_append_wpa_key_mgmt() { |
39 | hostapd_append_wpa_key_mgmt() { |
|
Line 40... | Line -... | |||
40 | local auth_type_l="$(echo $auth_type | tr 'a-z' 'A-Z')" |
- | ||
41 | |
- | ||
42 | case "$auth_type" in |
40 | local auth_type="$(echo $auth_type | tr 'a-z' 'A-Z')" |
|
43 | psk|eap) |
41 | |
|
44 | append wpa_key_mgmt "WPA-$auth_type_l" |
42 | append wpa_key_mgmt "WPA-$auth_type" |
|
45 | [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type_l}" |
- | ||
46 | [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type_l}-SHA256" |
- | ||
47 | ;; |
- | ||
48 | eap192) |
- | ||
49 | append wpa_key_mgmt "WPA-EAP-SUITE-B-192" |
- | ||
50 | ;; |
- | ||
51 | eap-eap192) |
- | ||
52 | append wpa_key_mgmt "WPA-EAP-SUITE-B-192" |
- | ||
53 | append wpa_key_mgmt "WPA-EAP" |
- | ||
54 | [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-EAP" |
- | ||
55 | [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-EAP-SHA256" |
- | ||
56 | ;; |
- | ||
57 | sae) |
- | ||
58 | append wpa_key_mgmt "SAE" |
- | ||
59 | [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-SAE" |
- | ||
60 | ;; |
- | ||
61 | psk-sae) |
- | ||
62 | append wpa_key_mgmt "WPA-PSK" |
- | ||
63 | [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-PSK" |
- | ||
64 | [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-PSK-SHA256" |
- | ||
65 | append wpa_key_mgmt "SAE" |
- | ||
66 | [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-SAE" |
- | ||
67 | ;; |
- | ||
68 | owe) |
- | ||
69 | append wpa_key_mgmt "OWE" |
- | ||
70 | ;; |
43 | [ "${ieee80211r:-0}" -gt 0 ] && append wpa_key_mgmt "FT-${auth_type}" |
|
Line 71... | Line 44... | |||
71 | esac |
44 | [ "${ieee80211w:-0}" -gt 0 ] && append wpa_key_mgmt "WPA-${auth_type}-SHA256" |
|
72 | } |
45 | } |
|
73 | |
46 | |
|
Line 166... | Line 139... | |||
166 | EOF |
139 | EOF |
|
167 | } |
140 | } |
|
Line 168... | Line 141... | |||
168 | |
141 | |
|
169 | hostapd_common_add_bss_config() { |
142 | hostapd_common_add_bss_config() { |
|
170 | config_add_string 'bssid:macaddr' 'ssid:string' |
143 | config_add_string 'bssid:macaddr' 'ssid:string' |
|
Line 171... | Line 144... | |||
171 | config_add_boolean wds wmm uapsd hidden utf8_ssid |
144 | config_add_boolean wds wmm uapsd hidden |
|
172 | |
145 | |
|
Line 173... | Line 146... | |||
173 | config_add_int maxassoc max_inactivity |
146 | config_add_int maxassoc max_inactivity |
|
Line 210... | Line 183... | |||
210 | |
183 | |
|
Line 211... | Line 184... | |||
211 | config_add_string 'key1:wepkey' 'key2:wepkey' 'key3:wepkey' 'key4:wepkey' 'password:wpakey' |
184 | config_add_string 'key1:wepkey' 'key2:wepkey' 'key3:wepkey' 'key4:wepkey' 'password:wpakey' |
|
Line 212... | Line -... | |||
212 | |
- | ||
213 | config_add_string wpa_psk_file |
- | ||
214 | |
185 | |
|
215 | config_add_int multi_ap |
186 | config_add_string wpa_psk_file |
|
216 | |
187 | |
|
217 | config_add_boolean wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 |
- | ||
Line 218... | Line 188... | |||
218 | config_add_int wps_ap_setup_locked wps_independent |
188 | config_add_boolean wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 |
|
219 | config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin |
189 | config_add_int wps_ap_setup_locked wps_independent |
|
220 | config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key |
190 | config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin |
|
Line 237... | Line 207... | |||
237 | config_add_array bssid_whitelist |
207 | config_add_array bssid_whitelist |
|
Line 238... | Line 208... | |||
238 | |
208 | |
|
239 | config_add_int mcast_rate |
209 | config_add_int mcast_rate |
|
240 | config_add_array basic_rate |
210 | config_add_array basic_rate |
|
241 | config_add_array supported_rates |
- | ||
242 | |
- | ||
243 | config_add_boolean sae_require_mfp |
- | ||
244 | |
- | ||
245 | config_add_string 'owe_transition_bssid:macaddr' 'owe_transition_ssid:string' |
211 | config_add_array supported_rates |
|
Line 246... | Line 212... | |||
246 | } |
212 | } |
|
247 | |
213 | |
|
248 | hostapd_set_bss_options() { |
214 | hostapd_set_bss_options() { |
|
Line 259... | Line 225... | |||
259 | wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \ |
225 | wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \ |
|
260 | wpa_disable_eapol_key_retries tdls_prohibit \ |
226 | wpa_disable_eapol_key_retries tdls_prohibit \ |
|
261 | maxassoc max_inactivity disassoc_low_ack isolate auth_cache \ |
227 | maxassoc max_inactivity disassoc_low_ack isolate auth_cache \ |
|
262 | wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 wps_ap_setup_locked \ |
228 | wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 wps_ap_setup_locked \ |
|
263 | wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \ |
229 | wps_independent wps_device_type wps_device_name wps_manufacturer wps_pin \ |
|
264 | macfilter ssid utf8_ssid wmm uapsd hidden short_preamble rsn_preauth \ |
230 | macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \ |
|
265 | iapp_interface eapol_version dynamic_vlan ieee80211w nasid \ |
231 | iapp_interface eapol_version dynamic_vlan ieee80211w nasid \ |
|
266 | acct_server acct_secret acct_port acct_interval \ |
232 | acct_server acct_secret acct_port acct_interval \ |
|
267 | bss_load_update_period chan_util_avg_period sae_require_mfp \ |
233 | bss_load_update_period chan_util_avg_period |
|
268 | multi_ap multi_ap_backhaul_ssid multi_ap_backhaul_key |
- | ||
Line 269... | Line 234... | |||
269 | |
234 | |
|
270 | set_default isolate 0 |
235 | set_default isolate 0 |
|
271 | set_default maxassoc 0 |
236 | set_default maxassoc 0 |
|
272 | set_default max_inactivity 0 |
237 | set_default max_inactivity 0 |
|
Line 279... | Line 244... | |||
279 | set_default tdls_prohibit 0 |
244 | set_default tdls_prohibit 0 |
|
280 | set_default eapol_version 0 |
245 | set_default eapol_version 0 |
|
281 | set_default acct_port 1813 |
246 | set_default acct_port 1813 |
|
282 | set_default bss_load_update_period 60 |
247 | set_default bss_load_update_period 60 |
|
283 | set_default chan_util_avg_period 600 |
248 | set_default chan_util_avg_period 600 |
|
284 | set_default utf8_ssid 1 |
- | ||
285 | set_default multi_ap 0 |
- | ||
286 | |
249 | |
|
287 | append bss_conf "ctrl_interface=/var/run/hostapd" |
250 | append bss_conf "ctrl_interface=/var/run/hostapd" |
|
288 | if [ "$isolate" -gt 0 ]; then |
251 | if [ "$isolate" -gt 0 ]; then |
|
289 | append bss_conf "ap_isolate=$isolate" "$N" |
252 | append bss_conf "ap_isolate=$isolate" "$N" |
|
290 | fi |
253 | fi |
|
291 | if [ "$maxassoc" -gt 0 ]; then |
254 | if [ "$maxassoc" -gt 0 ]; then |
|
Line 300... | Line 263... | |||
300 | append bss_conf "disassoc_low_ack=$disassoc_low_ack" "$N" |
263 | append bss_conf "disassoc_low_ack=$disassoc_low_ack" "$N" |
|
301 | append bss_conf "preamble=$short_preamble" "$N" |
264 | append bss_conf "preamble=$short_preamble" "$N" |
|
302 | append bss_conf "wmm_enabled=$wmm" "$N" |
265 | append bss_conf "wmm_enabled=$wmm" "$N" |
|
303 | append bss_conf "ignore_broadcast_ssid=$hidden" "$N" |
266 | append bss_conf "ignore_broadcast_ssid=$hidden" "$N" |
|
304 | append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" |
267 | append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N" |
|
305 | append bss_conf "utf8_ssid=$utf8_ssid" "$N" |
- | ||
306 | append bss_conf "multi_ap=$multi_ap" "$N" |
- | ||
Line 307... | Line 268... | |||
307 | |
268 | |
|
Line 308... | Line 269... | |||
308 | [ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" |
269 | [ "$tdls_prohibit" -gt 0 ] && append bss_conf "tdls_prohibit=$tdls_prohibit" "$N" |
|
309 | |
270 | |
|
Line 321... | Line 282... | |||
321 | append bss_conf "acct_server_shared_secret=$acct_secret" "$N" |
282 | append bss_conf "acct_server_shared_secret=$acct_secret" "$N" |
|
322 | [ -n "$acct_interval" ] && \ |
283 | [ -n "$acct_interval" ] && \ |
|
323 | append bss_conf "radius_acct_interim_interval=$acct_interval" "$N" |
284 | append bss_conf "radius_acct_interim_interval=$acct_interval" "$N" |
|
324 | } |
285 | } |
|
Line 325... | Line -... | |||
325 | |
- | ||
326 | case "$auth_type" in |
- | ||
327 | sae|owe|eap192|eap-eap192) |
- | ||
328 | set_default ieee80211w 2 |
- | ||
329 | set_default sae_require_mfp 1 |
- | ||
330 | ;; |
- | ||
331 | psk-sae) |
- | ||
332 | set_default ieee80211w 1 |
- | ||
333 | set_default sae_require_mfp 1 |
- | ||
334 | ;; |
- | ||
335 | esac |
- | ||
336 | [ -n "$sae_require_mfp" ] && append bss_conf "sae_require_mfp=$sae_require_mfp" "$N" |
- | ||
337 | |
286 | |
|
Line 338... | Line 287... | |||
338 | local vlan_possible="" |
287 | local vlan_possible="" |
|
339 | |
288 | |
|
340 | case "$auth_type" in |
- | ||
341 | none|owe) |
- | ||
342 | json_get_vars owe_transition_bssid owe_transition_ssid |
- | ||
343 | |
- | ||
344 | [ -n "$owe_transition_ssid" ] && append bss_conf "owe_transition_ssid=\"$owe_transition_ssid\"" "$N" |
- | ||
345 | [ -n "$owe_transition_bssid" ] && append bss_conf "owe_transition_bssid=$owe_transition_bssid" "$N" |
289 | case "$auth_type" in |
|
346 | |
290 | none) |
|
347 | wps_possible=1 |
291 | wps_possible=1 |
|
348 | # Here we make the assumption that if we're in open mode |
292 | # Here we make the assumption that if we're in open mode |
|
349 | # with WPS enabled, we got to be in unconfigured state. |
293 | # with WPS enabled, we got to be in unconfigured state. |
|
350 | wps_not_configured=1 |
294 | wps_not_configured=1 |
|
351 | ;; |
295 | ;; |
|
352 | psk|sae|psk-sae) |
296 | psk) |
|
353 | json_get_vars key wpa_psk_file |
297 | json_get_vars key wpa_psk_file |
|
354 | if [ ${#key} -lt 8 ]; then |
298 | if [ ${#key} -lt 8 ]; then |
|
355 | wireless_setup_vif_failed INVALID_WPA_PSK |
299 | wireless_setup_vif_failed INVALID_WPA_PSK |
|
Line 365... | Line 309... | |||
365 | } |
309 | } |
|
366 | [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] && append bss_conf "eapol_version=$eapol_version" "$N" |
310 | [ "$eapol_version" -ge "1" -a "$eapol_version" -le "2" ] && append bss_conf "eapol_version=$eapol_version" "$N" |
|
Line 367... | Line 311... | |||
367 | |
311 | |
|
368 | wps_possible=1 |
312 | wps_possible=1 |
|
369 | ;; |
313 | ;; |
|
370 | eap|eap192|eap-eap192) |
314 | eap) |
|
371 | json_get_vars \ |
315 | json_get_vars \ |
|
372 | auth_server auth_secret auth_port \ |
316 | auth_server auth_secret auth_port \ |
|
373 | dae_client dae_secret dae_port \ |
317 | dae_client dae_secret dae_port \ |
|
374 | ownip radius_client_addr \ |
318 | ownip radius_client_addr \ |
|
Line 424... | Line 368... | |||
424 | |
368 | |
|
425 | config_methods= |
369 | config_methods= |
|
426 | [ "$wps_pushbutton" -gt 0 ] && append config_methods push_button |
370 | [ "$wps_pushbutton" -gt 0 ] && append config_methods push_button |
|
Line 427... | Line -... | |||
427 | [ "$wps_label" -gt 0 ] && append config_methods label |
- | ||
428 | |
- | ||
429 | # WPS not possible on Multi-AP backhaul-only SSID |
- | ||
430 | [ "$multi_ap" = 1 ] && wps_possible= |
371 | [ "$wps_label" -gt 0 ] && append config_methods label |
|
431 | |
372 | |
|
432 | [ -n "$wps_possible" -a -n "$config_methods" ] && { |
373 | [ -n "$wps_possible" -a -n "$config_methods" ] && { |
|
433 | set_default ext_registrar 0 |
374 | set_default ext_registrar 0 |
|
434 | set_default wps_device_type "6-0050F204-1" |
375 | set_default wps_device_type "6-0050F204-1" |
|
Line 449... | Line 390... | |||
449 | append bss_conf "manufacturer=$wps_manufacturer" "$N" |
390 | append bss_conf "manufacturer=$wps_manufacturer" "$N" |
|
450 | append bss_conf "config_methods=$config_methods" "$N" |
391 | append bss_conf "config_methods=$config_methods" "$N" |
|
451 | append bss_conf "wps_independent=$wps_independent" "$N" |
392 | append bss_conf "wps_independent=$wps_independent" "$N" |
|
452 | [ -n "$wps_ap_setup_locked" ] && append bss_conf "ap_setup_locked=$wps_ap_setup_locked" "$N" |
393 | [ -n "$wps_ap_setup_locked" ] && append bss_conf "ap_setup_locked=$wps_ap_setup_locked" "$N" |
|
453 | [ "$wps_pbc_in_m1" -gt 0 ] && append bss_conf "pbc_in_m1=$wps_pbc_in_m1" "$N" |
394 | [ "$wps_pbc_in_m1" -gt 0 ] && append bss_conf "pbc_in_m1=$wps_pbc_in_m1" "$N" |
|
454 | [ "$multi_ap" -gt 0 ] && [ -n "$multi_ap_backhaul_ssid" ] && { |
- | ||
455 | append bss_conf "multi_ap_backhaul_ssid=\"$multi_ap_backhaul_ssid\"" "$N" |
- | ||
456 | if [ -z "$multi_ap_backhaul_key" ]; then |
- | ||
457 | : |
- | ||
458 | elif [ ${#multi_ap_backhaul_key} -lt 8 ]; then |
- | ||
459 | wireless_setup_vif_failed INVALID_WPA_PSK |
- | ||
460 | return 1 |
- | ||
461 | elif [ ${#multi_ap_backhaul_key} -eq 64 ]; then |
- | ||
462 | append bss_conf "multi_ap_backhaul_wpa_psk=$multi_ap_backhaul_key" "$N" |
- | ||
463 | else |
- | ||
464 | append bss_conf "multi_ap_backhaul_wpa_passphrase=$multi_ap_backhaul_key" "$N" |
- | ||
465 | fi |
- | ||
466 | } |
- | ||
467 | } |
395 | } |
|
Line 468... | Line 396... | |||
468 | |
396 | |
|
469 | append bss_conf "ssid=$ssid" "$N" |
397 | append bss_conf "ssid=$ssid" "$N" |
|
470 | [ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" "$N" |
398 | [ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" "$N" |
|
Line 660... | Line 588... | |||
660 | local ifname="$1" |
588 | local ifname="$1" |
|
661 | _w_driver="$2" |
589 | _w_driver="$2" |
|
Line 662... | Line 590... | |||
662 | |
590 | |
|
Line 663... | Line 591... | |||
663 | _wpa_supplicant_common "$1" |
591 | _wpa_supplicant_common "$1" |
|
Line 664... | Line 592... | |||
664 | |
592 | |
|
665 | json_get_vars mode wds multi_ap |
593 | json_get_vars mode wds |
|
666 | |
594 | |
|
667 | [ -n "$network_bridge" ] && { |
595 | [ -n "$network_bridge" ] && { |
|
668 | fail= |
596 | fail= |
|
669 | case "$mode" in |
597 | case "$mode" in |
|
670 | adhoc) |
598 | adhoc) |
|
671 | fail=1 |
599 | fail=1 |
|
672 | ;; |
600 | ;; |
|
673 | sta) |
601 | sta) |
|
Line 674... | Line 602... | |||
674 | [ "$wds" = 1 -o "$multi_ap" = 1 ] || fail=1 |
602 | [ "$wds" = 1 ] || fail=1 |
|
675 | ;; |
603 | ;; |
|
Line 695... | Line 623... | |||
695 | local country_str= |
623 | local country_str= |
|
696 | [ -n "$country" ] && { |
624 | [ -n "$country" ] && { |
|
697 | country_str="country=$country" |
625 | country_str="country=$country" |
|
698 | } |
626 | } |
|
Line 699... | Line -... | |||
699 | |
- | ||
700 | multiap_flag_file="${_config}.is_multiap" |
- | ||
701 | if [ "$multi_ap" = "1" ]; then |
- | ||
702 | touch "$multiap_flag_file" |
- | ||
703 | else |
- | ||
704 | [ -e "$multiap_flag_file" ] && rm "$multiap_flag_file" |
- | ||
705 | fi |
627 | |
|
706 | wpa_supplicant_teardown_interface "$ifname" |
628 | wpa_supplicant_teardown_interface "$ifname" |
|
707 | cat > "$_config" <<EOF |
629 | cat > "$_config" <<EOF |
|
708 | $ap_scan |
630 | $ap_scan |
|
709 | $country_str |
631 | $country_str |
|
Line 742... | Line 664... | |||
742 | wireless_vif_parse_encryption |
664 | wireless_vif_parse_encryption |
|
Line 743... | Line 665... | |||
743 | |
665 | |
|
744 | json_get_vars \ |
666 | json_get_vars \ |
|
745 | ssid bssid key \ |
667 | ssid bssid key \ |
|
746 | basic_rate mcast_rate \ |
668 | basic_rate mcast_rate \ |
|
747 | ieee80211w ieee80211r \ |
- | ||
Line 748... | Line 669... | |||
748 | multi_ap |
669 | ieee80211w ieee80211r |
|
749 | |
- | ||
Line 750... | Line 670... | |||
750 | set_default ieee80211r 0 |
670 | |
|
751 | set_default multi_ap 0 |
671 | set_default ieee80211r 0 |
|
752 | |
672 | |
|
753 | local key_mgmt='NONE' |
673 | local key_mgmt='NONE' |
|
Line 766... | Line 686... | |||
766 | |
686 | |
|
767 | [ "$_w_driver" = "nl80211" ] || append wpa_key_mgmt "WPA-NONE" |
687 | [ "$_w_driver" = "nl80211" ] || append wpa_key_mgmt "WPA-NONE" |
|
Line 768... | Line 688... | |||
768 | } |
688 | } |
|
769 | |
689 | |
|
770 | [[ "$_w_mode" = "mesh" ]] && { |
690 | [[ "$_w_mode" = "mesh" ]] && { |
|
Line 771... | Line 691... | |||
771 | json_get_vars mesh_id mesh_fwding mesh_rssi_threshold |
691 | json_get_vars mesh_id mesh_fwding |
|
772 | [ -n "$mesh_id" ] && ssid="${mesh_id}" |
692 | [ -n "$mesh_id" ] && ssid="${mesh_id}" |
|
773 | |
- | ||
774 | append network_data "mode=5" "$N$T" |
693 | |
|
775 | [ -n "$mesh_fwding" ] && append network_data "mesh_fwding=${mesh_fwding}" "$N$T" |
694 | append network_data "mode=5" "$N$T" |
|
776 | [ -n "$mesh_rssi_threshold" ] && append network_data "mesh_rssi_threshold=${mesh_rssi_threshold}" "$N$T" |
695 | [ -n "$mesh_fwding" ] && append network_data "mesh_fwding=${mesh_fwding}" "$N$T" |
|
777 | [ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" |
696 | [ -n "$freq" ] && wpa_supplicant_set_fixed_freq "$freq" "$htmode" |
|
778 | [ "$noscan" = "1" ] && append network_data "noscan=1" "$N$T" |
697 | [ "$noscan" = "1" ] && append network_data "noscan=1" "$N$T" |
|
Line 779... | Line 698... | |||
779 | append wpa_key_mgmt "SAE" |
698 | append wpa_key_mgmt "SAE" |
|
Line 780... | Line -... | |||
780 | scan_ssid="" |
- | ||
781 | } |
- | ||
782 | |
699 | scan_ssid="" |
|
783 | [ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ] && append network_data "$_w_modestr" "$N$T" |
700 | } |
|
784 | |
- | ||
785 | [ "$multi_ap" = 1 -a "$_w_mode" = "sta" ] && append network_data "multi_ap_backhaul_sta=1" "$N$T" |
- | ||
786 | |
- | ||
787 | case "$auth_type" in |
701 | |
|
788 | none) ;; |
702 | [ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ] && append network_data "$_w_modestr" "$N$T" |
|
789 | owe) |
703 | |
|
790 | hostapd_append_wpa_key_mgmt |
704 | case "$auth_type" in |
|
791 | ;; |
705 | none) ;; |
|
792 | wep) |
706 | wep) |
|
793 | local wep_keyidx=0 |
- | ||
794 | hostapd_append_wep_key network_data |
- | ||
795 | append network_data "wep_tx_keyidx=$wep_keyidx" "$N$T" |
- | ||
796 | ;; |
707 | local wep_keyidx=0 |
|
Line 797... | Line 708... | |||
797 | wps) |
708 | hostapd_append_wep_key network_data |
|
798 | key_mgmt='WPS' |
709 | append network_data "wep_tx_keyidx=$wep_keyidx" "$N$T" |
|
799 | ;; |
710 | ;; |
|
Line 815... | Line 726... | |||
815 | passphrase="psk=\"${key}\"" |
726 | passphrase="psk=\"${key}\"" |
|
816 | fi |
727 | fi |
|
817 | fi |
728 | fi |
|
818 | append network_data "$passphrase" "$N$T" |
729 | append network_data "$passphrase" "$N$T" |
|
819 | ;; |
730 | ;; |
|
820 | eap|eap192|eap-eap192) |
731 | eap) |
|
821 | hostapd_append_wpa_key_mgmt |
732 | hostapd_append_wpa_key_mgmt |
|
822 | key_mgmt="$wpa_key_mgmt" |
733 | key_mgmt="$wpa_key_mgmt" |
|
Line 823... | Line 734... | |||
823 | |
734 | |
|
824 | json_get_vars eap_type identity anonymous_identity ca_cert |
735 | json_get_vars eap_type identity anonymous_identity ca_cert |
|
Line 902... | Line 813... | |||
902 | local mc_rate= |
813 | local mc_rate= |
|
903 | wpa_supplicant_add_rate mc_rate "$mcast_rate" |
814 | wpa_supplicant_add_rate mc_rate "$mcast_rate" |
|
904 | append network_data "mcast_rate=$mc_rate" "$N$T" |
815 | append network_data "mcast_rate=$mc_rate" "$N$T" |
|
905 | } |
816 | } |
|
Line 906... | Line -... | |||
906 | |
- | ||
907 | if [ "$key_mgnt" = "WPS" ]; then |
- | ||
908 | echo "wps_cred_processing=1" >> "$_config" |
- | ||
909 | else |
817 | |
|
910 | cat >> "$_config" <<EOF |
818 | cat >> "$_config" <<EOF |
|
911 | network={ |
819 | network={ |
|
912 | $scan_ssid |
820 | $scan_ssid |
|
913 | ssid="$ssid" |
821 | ssid="$ssid" |
|
914 | key_mgmt=$key_mgmt |
822 | key_mgmt=$key_mgmt |
|
915 | $network_data |
823 | $network_data |
|
916 | } |
824 | } |
|
917 | EOF |
- | ||
918 | fi |
825 | EOF |
|
919 | return 0 |
826 | return 0 |
|
Line 920... | Line 827... | |||
920 | } |
827 | } |
|
921 | |
828 | |
|
Line 922... | Line 829... | |||
922 | wpa_supplicant_run() { |
829 | wpa_supplicant_run() { |
|
Line 923... | Line 830... | |||
923 | local ifname="$1"; shift |
830 | local ifname="$1"; shift |
|
924 | |
831 | |
|
925 | _wpa_supplicant_common "$ifname" |
832 | _wpa_supplicant_common "$ifname" |
|
926 | |
833 | |
|
927 | /usr/sbin/wpa_supplicant -B -s \ |
834 | /usr/sbin/wpa_supplicant -B \ |
|
928 | ${network_bridge:+-b $network_bridge} \ |
835 | ${network_bridge:+-b $network_bridge} \ |