#683407 network-manager: deauthenticating by local choice reason=3

Package:
network-manager
Source:
network-manager
Description:
network management framework (daemon and userspace tools)
Submitter:
edap
Date:
2014-10-21 15:03:10 UTC
Severity:
important
#683407#5
Date:
2012-07-31 15:42:02 UTC
From:
To:
Dear Maintainer,
I've this problem that i think is related to Network-manager
Internet wireless connection come and go.
Same problem reported here
https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/198405
http://azitech.wordpress.com/2010/02/22/deauthenticating-reason3/

#683407#10
Date:
2012-08-01 15:22:32 UTC
From:
To:
Hey, i've tried do reanable ipv6.
In gnome shell, after having disabled ipv6, network-manager in gnome-shell
stop to works with wireless connection.
Now, it works only sometimes. When it doesn't work, that's the error
message:

[   41.354215] Intel AES-NI instructions are not detected.
[   51.152049] wlan0: no IPv6 routers present
[  184.030032] iwlwifi 0000:03:00.0: Tx aggregation enabled on ra =
00:1c:df:7f:76:a1 tid = 0
[  247.431054] wlan0: deauthenticating from 00:1c:df:7f:76:a1 by local
choice (reason=3)

#683407#15
Date:
2012-08-02 17:07:59 UTC
From:
To:
Hey,
I've added this line to /etc/modprobe.d/options.conf
options iwlwifi 11n_disable=1
as explained here
http://ubuntuforums.org/showthread.php?t=1975199

Until now everything is ok.
Hope you find this information useful as well,
thanks,

That's the output lspci -vnvn related to my wireless card.

03:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 5100 AGN
[Shiloh] Network Connection [8086:4237]
Subsystem: Intel Corporation WiFi Link 5100 AGN [8086:1211]
 Physical Slot: 1
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
 Interrupt: pin A routed to IRQ 46
Region 0: Memory at f4300000 (64-bit, non-prefetchable) [size=8K]
 Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
 Address: 00000000fee0300c  Data: 41a9
Capabilities: [e0] Express (v1) Endpoint, MSI 00
 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
 DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
 MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
 LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns,
L1 <32us
 ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
 ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt-
ABWMgmt-
 Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP-
ECRC- UnsupReq- ACSViol-
 UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP-
ECRC- UnsupReq- ACSViol-
 UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+
ECRC- UnsupReq- ACSViol-
 CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
 AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [140 v1] Device Serial Number 00-26-c6-ff-ff-3f-25-e6
 Kernel driver in use: iwlwifi

#683407#20
Date:
2014-10-21 14:51:30 UTC
From:
To:
The biggest issue here in my mind is that the correct error is not being
surfaced.  The second biggest is that it is impossible to configure some
options necessary for connection to certain networks via network manager
UI.  From what I can gather, the flow of events is this:

1. network manager starts a wifi connection.  via dbus, it tells the
wpa_supplicant daemon to connect and passes it the necessary details.
The connection associates successfully:

Oct 21 10:17:59 localhost kernel: [ 2315.628273] wlan0: authenticate
with 40:f4:ec:1b:32:bf
Oct 21 10:17:59 localhost kernel: [ 2315.630571] wlan0: send auth to
40:f4:ec:1b:32:bf (try 1/3)
Oct 21 10:17:59 localhost kernel: [ 2315.632531] wlan0: authenticated
Oct 21 10:17:59 localhost kernel: [ 2315.636175] wlan0: associate with
40:f4:ec:1b:32:bf (try 1/3)
Oct 21 10:17:59 localhost kernel: [ 2315.639926] wlan0: RX AssocResp
from 40:f4:ec:1b:32:bf (capab=0x11 status=0 aid=29)
Oct 21 10:17:59 localhost kernel: [ 2315.642209] wlan0: associated
Oct 21 10:17:59 localhost kernel: [ 2315.642297] cfg80211: Calling CRDA
for country: US
Oct 21 10:17:59 localhost kernel: [ 2315.677160] cfg80211: Regulatory
domain changed to country: US
Oct 21 10:17:59 localhost kernel: [ 2315.677163] cfg80211:  DFS Master
region: FCC
Oct 21 10:17:59 localhost kernel: [ 2315.677165] cfg80211: (start_freq -
end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Oct 21 10:17:59 localhost kernel: [ 2315.677167] cfg80211: (2402000 KHz
- 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
Oct 21 10:17:59 localhost kernel: [ 2315.677168] cfg80211: (5170000 KHz
- 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
Oct 21 10:17:59 localhost kernel: [ 2315.677170] cfg80211: (5250000 KHz
- 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
Oct 21 10:17:59 localhost kernel: [ 2315.677171] cfg80211: (5735000 KHz
- 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
Oct 21 10:17:59 localhost kernel: [ 2315.677172] cfg80211: (57240000 KHz
- 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)

2. If that connection involves complicated authentication, then it can
go wrong.  The messages are logged by wpa_supplicant to /var/log/syslog

Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0:
CTRL-EVENT-SSID-REENABLED id=0 ssid="TechSpaceUnionSquareWireless"
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0: SME: Trying to
authenticate with 40:f4:ec:1b:32:bf (SSID='TechSpaceUnionSquareWireless'
freq=5180 MHz)
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0: Trying to
associate with 40:f4:ec:1b:32:bf (SSID='TechSpaceUnionSquareWireless'
freq=5180 MHz)
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0: Associated with
40:f4:ec:1b:32:bf
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0:
CTRL-EVENT-EAP-STARTED EAP authentication started
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0:
CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0:
CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25 -> NAK
Oct 21 10:17:59 localhost wpa_supplicant[2406]: wlan0:
CTRL-EVENT-EAP-FAILURE EAP authentication failed

In this case, the supplicant proposes a particular method of
authentication, PEAP (25 - see
http://www.networksorcery.com/enp/protocol/eap.htm ), but the router
does not support that.  Presumably this one wants EAP-MSCHAP-V2 or
something.  Here is problem #2: I can't con

3. wpa_supplicant returns a failure to network manager, which responds
by closing the connection.  Hence the "disconnected by local choice"
message that you see in dmesg

Oct 21 10:18:01 localhost wpa_supplicant[2406]: wlan0: Authentication
with 40:f4:ec:1b:32:bf timed out.
Oct 21 10:18:01 localhost kernel: [ 2317.794239] wlan0: deauthenticating
from 40:f4:ec:1b:32:bf by local choice (Reason: 3=DEAUTH_LEAVING)
Oct 21 10:18:01 localhost kernel: [ 2317.803176] cfg80211: Calling CRDA
to update world regulatory domain
Oct 21 10:18:01 localhost kernel: [ 2317.809017] cfg80211: World
regulatory domain updated:
Oct 21 10:18:01 localhost kernel: [ 2317.809023] cfg80211:  DFS Master
region: unset

My partial solution, and I say partial because it involves manually
configuring wpa_supplicant, was to set a couple of extra options;

root@frank:/var/log# cat /etc/wpa_supplicant.conf
network={
     ssid="TechSpaceUnionSquareWireless"
     scan_ssid=1
     key_mgmt=WPA-EAP
     eap=PEAP
     identity="USERNAME"
     password="PASSWORD"
     phase1="peaplabel=0"
     phase2="auth=MSCHAPV2"
}
root@frank:/var/log#

Then, with network manager not actively trying to do anything, kill
wpa_supplicant, start my own and run dhclient manually:

root@frank:/home/samv# pkill wpa_supplicant; wpa_supplicant -iwlan0
-c/etc/wpa_supplicant.conf -B -s
root@frank:/home/samv# dhclient wlan0

With this, I get the following logged to syslog:

Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0: SME: Trying to
authenticate with 40:f4:ec:1b:32:bf (SSID='TechSpaceUnionSquareWireless'
freq=5180 MHz)
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0: Trying to
associate with 40:f4:ec:1b:32:bf (SSID='TechSpaceUnionSquareWireless'
freq=5180 MHz)
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0: Associated with
40:f4:ec:1b:32:bf
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-EAP-STARTED EAP authentication started
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-EAP-PEER-CERT depth=0
subject='/O=Unknown/OU=Unknown/CN=acs1-av-campus'
Oct 21 10:43:11 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-EAP-PEER-CERT depth=0
subject='/O=Unknown/OU=Unknown/CN=acs1-av-campus'
Oct 21 10:43:12 localhost wpa_supplicant[3296]: EAP-MSCHAPV2:
Authentication succeeded
Oct 21 10:43:12 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
Oct 21 10:43:12 localhost wpa_supplicant[3296]: wlan0: WPA: Key
negotiation completed with 40:f4:ec:1b:32:bf [PTK=CCMP GTK=CCMP]
Oct 21 10:43:12 localhost wpa_supplicant[3296]: wlan0:
CTRL-EVENT-CONNECTED - Connection to 40:f4:ec:1b:32:bf completed [id=0
id_str=]

I'm running a fresh (<1week) Debian testing install, currently with the
legacy Gnome desktop.

HTH!
Sam