Bug 227864 - wpa_supplicant fails parse of key_mgmt= and proto=
Summary: wpa_supplicant fails parse of key_mgmt= and proto=
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-30 03:20 UTC by mr_beaner_2003
Modified: 2018-05-08 19:26 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mr_beaner_2003 2018-04-30 03:20:59 UTC
I receive parse errors when defining key_mgmt= and proto= within a network block. key_mgmt values have been attempted with "WPA", "WPA-PSK", and "WPA-PSK WPA-EAP" All of those options yielded a parse error. When proto= is set to "WPA2" or "WPA RSN," a parse error also occurs.

# wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 -Bdd

I have also been having consistent packet drops, may be related.

wpa_supplicant v2.5
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='"/var/run/wpa_supplicant"'
ctrl_interface_group='"wheel"'
eapol_version=1
ap_scan=1
fast_reauth=1
Line: 9 - start of a new network block
priority=10 (0xa)
scan_ssid=0 (0x0)
mode=0 (0x0)
Line 13: invalid key_mgmt '"WPA-PSK"'
Line 13: no key_mgmt values configured.
key_mgmt: 0x0
Line 13: failed to parse key_mgmt '"WPA-PSK"'.
Line 14: invalid proto '"WPA2"'
Line 14: no proto values configured.
proto: 0x0
Line 14: failed to parse proto '"WPA2"'.
ssid - [REMOVED]    
PSK (ASCII passphrase) - [REMOVED]
PSK (from passphrase) - [REMOVED]
Line 17: failed to parse network block.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.
Failed to add interface wlan0
: Cancelling scan request
: Cancelling authentication timeout
Comment 1 Hyun Hwang 2018-04-30 04:04:51 UTC
Try without double quotes around values, like: `key_mgmt=WPA-PSK WPA-EAP`
Comment 2 mr_beaner_2003 2018-04-30 05:27:39 UTC
Ok, great. I'm not sure why double-quotes are permitted for psk= and ssid=, but okay.

Now if I can narrow down the cause of the 20-50% packet loss. It's definitely something in the FreeBSD codebase because DBSD, OBSD and NBSD work without packet loss. Shall I open a separate case?
Comment 3 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-04-30 11:18:04 UTC
(In reply to mr_beaner_2003 from comment #2)

Double quotes change meaning of values.[1]

[1]: https://wiki.freebsd.org/WiFi/FAQ#I_am_sure_I_put_correct_password_into_.2Fetc.2Fwpa_supplicant.conf_but_it_still_doesn.27t_work
Comment 4 mr_beaner_2003 2018-05-08 18:31:30 UTC
You may close this case. Excluding double-quotes on key_mgmt= and proto= cleared this issue.

I do recommend that the documentation and business logic pushes for double-quotes around strings or not, consistently.