FS#44731 - [wpa_supplicant] netctl-auto service for wireless NIC broken after wpa_supplicant upgrade to 2.4-1
Attached to Project:
Arch Linux
Opened by Josh Chia (Syncopated) - Saturday, 25 April 2015, 16:38 GMT
Last edited by Evangelos Foutras (foutrelis) - Tuesday, 19 January 2016, 16:24 GMT
Opened by Josh Chia (Syncopated) - Saturday, 25 April 2015, 16:38 GMT
Last edited by Evangelos Foutras (foutrelis) - Tuesday, 19 January 2016, 16:24 GMT
|
Details
Description:
Under wpa-supplicant 2.4-1, starting netctl-auto@wlp3s0.service fails connect WiFi, and I can't get a DHCP IP, even though the service is shown as "active (running)" Additional info: * netctl 1.10-1, wpa_supplicant 2.4-1, wpa_actiond 1.4-2 Log: Apr 25 12:44:47 sauron wpa_actiond[6952]: Interface 'wlp3s0' connected to network 'Edward' Apr 25 12:44:47 sauron dhcpcd[6974]: DUID xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx Apr 25 12:44:47 sauron dhcpcd[6974]: wlp3s0: IAID xx:xx:xx:xx Apr 25 12:44:47 sauron dhcpcd[6974]: wlp3s0: rebinding lease of 192.168.1.20 Apr 25 12:44:51 sauron dhcpcd[6974]: wlp3s0: leased 192.168.1.20 for 43200 seconds Apr 25 12:44:51 sauron dhcpcd[6974]: wlp3s0: adding route to 192.168.1.0/24 Apr 25 12:44:51 sauron dhcpcd[6974]: wlp3s0: adding default route via 192.168.1.1 12:55 ~$ journalctl -xe -u netctl-auto@wlp3s0.service Apr 25 12:36:28 sauron netctl-auto[5505]: Included profile 'wlp3s0-cz' Apr 25 12:36:28 sauron netctl-auto[5505]: Successfully initialized wpa_supplicant Apr 25 12:36:28 sauron netctl-auto[5505]: Could not read interface p2p-dev-wlp3s0 flags: No such device Apr 25 12:36:28 sauron systemd[1]: Started Automatic wireless network connection using netctl profiles. -- Subject: Unit netctl-auto@wlp3s0.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit netctl-auto@wlp3s0.service has finished starting up. Referenced in this forum thread: https://bbs.archlinux.org/viewtopic.php?id=196584 Steps to reproduce: 1. Start or restart netctl-auto@wlp3s0.service with systemctl 2. Wait and get no IP address showing up under ifconfig 3. See the "Could not read interface" error in the log |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Tuesday, 19 January 2016, 16:24 GMT
Reason for closing: Fixed
Additional comments about closing: wpa_supplicant 1:2.5-2
Tuesday, 19 January 2016, 16:24 GMT
Reason for closing: Fixed
Additional comments about closing: wpa_supplicant 1:2.5-2
Looking deeper at the logs, I noticed this error message from wpa_actiond (which is required by netctl-auto):
Apr 25 16:16:57 archpad wpa_actiond[2571]: Error (wlp3s0): Could not attach to wpa_supplicant
This seems to indicate that wpa_actiond can't attach to wpa_supplicant's control socket for some reason. I don't see this error anytime before the most recent wpa_supplicant upgrade, so it seems to be relevant to this netctl-auto bug.
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
Causes this problem.
However, reverting to 1:2.3-1 did *not* fix it for me.
commit 97752f7930af55106b0959c2bb191d982382afe3
Author: Johannes Berg <johannes.berg@intel.com>
Date: Mon Oct 20 12:00:08 2014 +0200
Revert "nl80211: Do not indicate P2P_DEVICE support by default"
This reverts commit 851b0c5581069de6db01ddca7c150b76cee415a2.
The kernel now has full support for this (and it is turned off
by default for hwsim) so wpa_supplicant should really go back
to autodetecting this so clients don't have to figure out what
to do.
Also add a debug message stating that P2P_DEVICE support is used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reverting the commit fixes the issue.
Unassigning myself.
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)
I really want to avoid downgrading the package to 2.3 (again) but this is not an issue I can troubleshoot.
[1] http://lists.infradead.org/mailman/listinfo/hostap
I just toggled my hardware button a few times though.
Of course, this is on 1:2.3; I'm afraid that the bug with 2.5 is still very much present.
The relevant switch for wpa_supplicant is -m <interface>. Specifying -m '' seems to prevent wpa_supplicant creating a p2p interface in /run/wpa_supplicant.
I used the per-device flag in /etc/netctl/interfaces/<interface-name> file which is sourced by netctl-auto:
# IFACE=wlp58s0
# echo WPAOptions=\"-m \'\'\" > /etc/netctl/interfaces/$IFACE
# chmod +x /etc/netctl/interfaces/$IFACE
Versions of relevant packages I'm using:
$ pacman -Q wpa_supplicant wpa_actiond netctl
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
08:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)
So, is it a wpa_supplicant upstream problem or a netctl one ?
I could not find much documentation on the '-m' switch. The man page does not list it and `wpa_supplicant -h` lists:
[-m<P2P Device config file>]
(...)
-m = Configuration file for the P2P Device interface
It could very well be that '-W' is somehow not appropriate, but the current information does not really tell me what it should be, or why adding '-m' is the proper solution. Maybe it is still wpa_supplicant that is misbehaving?
http://lists.infradead.org/pipermail/hostap/2015-December/034354.html
wpa_supplicant 1:2.5-1
wpa_actiond 1.4-2
netctl 1.11-1
Wireless card: Intel(R) Dual Band Wireless AC 7265, REV=0x210
Just to add a bit more information:
I created a per-interface netctl configuration file with WPADriver=wext in it, and that also solves the problem (the default for WPADriver is 'nl80211,wext'). According to wpa_supplicant's Changelog, in version 2.4 P2P_DEVICE support was enabled for the nl80211 driver by default.
Maybe the default netctl ordering for WPADriver should be changed to have wext tried first, until there is a bug fix for this. That technically shouldn't break anything since wpa_supplicant moves through the specified drivers list in order and stops at the first one able to initialize the device. I realize that wext is deprecated, so I suppose this option could bring some regressions with it as well (or maybe not?).
Dec 20 10:26:13 briquette netctl-auto[298]: DEBUG: wpa_start: wpa_supplicant -q -B -P /run/wpa_supplicant_wlp3s0.pid -i wlp3s0 -D nl80211,wext -c/run/network/wpa_supplicant_wlp3s0.conf -m '' -W
Dec 20 10:26:14 briquette netctl-auto[298]: Failed to open config file '//''', error: No such file or directory
Dec 20 10:26:14 briquette netctl-auto[298]: Failed to read or parse configuration '//'''.
So my guess is that providing -m '' just forces wpa_supplicant to fall back to hard coded values which I think just disables p2p.
I think the proper way is to either provide p2pconf file with p2p_disabled=1 and pass it as argument to -m option, or that property might be usable from conf file specified with -c option.
I'll experiment and report back.
--- /usr/lib/network/wpa 2015-12-20 12:29:46.465292457 -0800
+++ /usr/lib/network/wpa.fixed 2015-12-20 12:30:19.648331398 -0800
@@ -210,6 +210,7 @@
if is_yes "${AdHoc:-no}"; then
echo "ap_scan=2" >> "$config_file"
fi
+ echo "p2p_disabled=1" >> "$config_file"
echo "$config_file"
}
So it looks like netctl needs to learn how to deal with p2p interfaces and might be -W is not appropriate in this case. p2p_disable set to 1 by default seems more sensible though.
Another thought is to provide a way to get this setting passed from /etc/netctl/interface/<iface> file to -m option
I reopened
FS#47428which doesn't seem to use netctl but if someone else can reproduce the issue with just wpa_supplicant (or hack netctl to produce debugging output), feel free to post your logs.[1] http://lists.infradead.org/pipermail/hostap/2015-December/034392.html
http://pkgbuild.com/~foutrelis/test-builds/wpa_supplicant/patch-561146/
It includes the second patch (561146) from here: http://lists.infradead.org/pipermail/hostap/2015-December/034409.html
http://pastebin.com/njiNp6Ju
Downgrading to 2.3 worked.
Three different network cards:
http://pastebin.com/YFdJfxyE
2.5-2 was installed