Bug 192597

Summary: [PATCH] WPA-EAP broken, PEAP auth methods sent incorrectly
Product: [Unmaintained] Network Management Reporter: Per Hermansson <hermansson.per>
Component: Plasma WidgetAssignee: Will Stephenson <wstephenson>
Status: RESOLVED FIXED    
Severity: normal CC: anton, cfigura77, dchris, gokcen.eraslan, greg.laun, info, ohad, paulo.fidalgo.pt, sebas
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: patch for using auth instead of autheap
log of NetworkManager - failed connection
log of NetworkManager - failed connection II
qdbus output under plasma-widget-networkmanager
/var/log/daemon.log output under plasma-widget-networkmanager
/var/log/daemon.log after fix suggested by W. Stephenson
/var/log/daemon.log output under nm-applet

Description Per Hermansson 2009-05-13 20:43:36 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Ubuntu Packages

When configuring WPA-Enterprise connections the plasma widget gives four auth methods that can be used with PEAP and TTLS.

During transmission over DBUS to network manager the auth method is send using the "autheap" key in which not all auth methods are available. Changing the key to "auth" makes all specified auth methods work.

The provided patch updates the widget to set the auth variable instead of the autheap one. Note this might break already configured connections.

The fix is reported to work by me and here https://bugs.launchpad.net/ubuntu/+source/plasma-widget-network-manager/+bug/334052/comments/42
Comment 1 Per Hermansson 2009-05-13 20:44:29 UTC
Created attachment 33638 [details]
patch for using auth instead of autheap
Comment 2 Per Hermansson 2009-05-13 20:47:58 UTC
Sorry invalid, wrong component
Comment 3 Per Hermansson 2009-05-13 20:59:41 UTC
thanks for moving moving this, should be correct now
Comment 4 Will Stephenson 2009-07-27 12:10:04 UTC
I'm looking hard at this right now but I can't commit the patch as is as it will break connections that do use autheap as the phase2 auth style.

To make it work right i have to rework a lot of the UI.
Comment 5 Will Stephenson 2009-07-31 06:49:36 UTC
*** Bug 186325 has been marked as a duplicate of this bug. ***
Comment 6 Will Stephenson 2009-07-31 20:16:59 UTC
*** Bug 191040 has been marked as a duplicate of this bug. ***
Comment 7 Will Stephenson 2009-08-16 23:03:49 UTC
Fixed, please test with knetworkmanager trunk and kdebase-workspace 4.3 branch.
Comment 8 Cyril Brosch 2009-08-25 14:23:03 UTC
I didn't get my university network to work with the new revision, too, trying both PEAP and TTLS.
The applet tries to connect, but after some time it asks again for the security settings.

I attach the log of a failed connection attempt. Something seems wrong with the certificate, at least the name does not conform with the certificates I wrote in ("use system CA certs" is unchecked).
Comment 9 Cyril Brosch 2009-08-25 14:24:22 UTC
Created attachment 36434 [details]
log of NetworkManager - failed connection
Comment 10 Will Stephenson 2009-08-30 11:04:56 UTC
Cyril: Are you using SVN or packages? which revision?

Aug 25 13:37:29 linux-oqzl NetworkManager: <WARN>  connection_get_settings_cb(): connection_get_settings_cb: Invalid connection: 'NMSettingConnection' / 'id' invalid: 1

This indicates one of your connections is invalid.  Can you delete all other connections and see if NM still prints this warning when you start KNetworkManager (tail -f /var/log/whatever-ubuntu-uses-for-nm-logs).  If it persists, delete and recreate the EAP-PEAP connection too.

Aug 25 13:37:33 linux-oqzl NetworkManager: <info>  Config: added 'ca_cert' value 'blob://-org-freedesktop-NetworkManagerSettings-9-ca_cert'

This is something NM uses to describe the ca-cert sent by NM as a series of bytes.
Comment 11 Cyril Brosch 2009-08-30 11:41:49 UTC
Thanks for the hints!

I use OpenSuse packages:
NetworkManager 0.7.0.r4359-15.2.2
knetworkmanager 0.9.svn1012598-93.2

I'll delete my connections and retry connecting ASAP.
Comment 12 Cyril Brosch 2009-09-01 19:25:08 UTC
I deleted all my connections and after reboot tried again, but still without success.
I'll attach the log.
My university network prefers WPA2 and AES encryption, but WPA and RC4 or TKIP should work fine, too (I see no possibility to set this manually in order to test).
Comment 13 Cyril Brosch 2009-09-01 19:26:08 UTC
Created attachment 36618 [details]
log of NetworkManager - failed connection II
Comment 14 Charlie Figura 2009-09-08 15:45:18 UTC
I just upgraded to the plasmoid-widget-network-manager version 0.1~svn1017841-0ubuntu2~jaunty3 package, and there's no joy - I'm still NOT getting PEAP authentication.

/var/log/daemon.log and qdbus output is attached.
Comment 15 Charlie Figura 2009-09-08 15:45:51 UTC
Created attachment 36792 [details]
qdbus output under plasma-widget-networkmanager
Comment 16 Charlie Figura 2009-09-08 15:47:04 UTC
Created attachment 36793 [details]
/var/log/daemon.log output under plasma-widget-networkmanager
Comment 17 Will Stephenson 2009-09-10 14:57:23 UTC
Charlie: sounds like you are suffering bug 188085 too.
Comment 18 Will Stephenson 2009-09-11 17:44:26 UTC
SVN commit 1022361 by wstephens:

When a connection's wireless security type is changed, previous wireless security
setting state was not being fully reset, leading to duplicate and
incorrect settings to be sent, that are marked invalid by
NetworkManager.

Charlie:  Either delete and recreate this connection or change the
wireless security type away from WPA Enterprise and back again to reset
the state and get rid of the dupe WEP ciphers seen in your log in
comment #16.

BUG: 192597



 M  +2 -1      internals/setting.h  
 M  +20 -0     internals/settings/802-11-wireless-security.cpp  
 M  +2 -0      internals/settings/802-11-wireless-security.h  
 M  +9 -1      ui/security/wirelesssecuritysettingwidget.cpp  
 M  +2 -1      ui/security/wirelesssecuritysettingwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1022361
Comment 19 Charlie Figura 2009-09-11 18:13:07 UTC
Will, I hate to tell you, but that doesn't seem to have had any effect.  I tried both solutions you mentioned, as well as deleteing the .kde/share/config/networkmanagementrc file (wiping out all connection information), and it *still* does the same thing - I've reattached the latest /var/log/daemon.log, but I'm pretty sure it's the same.
Comment 20 Charlie Figura 2009-09-11 18:14:49 UTC
Created attachment 36871 [details]
/var/log/daemon.log after fix suggested by W. Stephenson

/var/log/daemon.log after fix suggested by W. Stephenson
Comment 21 Charlie Figura 2009-09-11 18:23:13 UTC
Created attachment 36872 [details]
/var/log/daemon.log output under nm-applet

/var/log/daemon.log output under nm-applet
Comment 22 Charlie Figura 2009-09-11 18:24:52 UTC
It looks like knetworkmanager is still setting key_mgmt as 'WPA-EAP', NOT 'IEEE8021X'.  I don't know if that's significant, but it seems that it might be so.  And again, this is a fresh configuration.
Comment 23 Will Stephenson 2009-09-11 20:30:44 UTC
BKO is down so I'm replying directly. 

Just to make sure, are you already running the code I committed today?

And I don't mind you telling me it doesn't work - this is the only way to 
debug these things.  Thanks for giving it your time.

Will

On Friday 11 September 2009 18:24:53 Charles Figura wrote:
> https://bugs.kde.org/show_bug.cgi?id=192597
> 
> 
> 
> 
> 
> --- Comment #22 from Charles Figura <charles figura wartburg edu> 
>  2009-09-11 18:24:52 --- It looks like knetworkmanager is still setting
>  key_mgmt as 'WPA-EAP', NOT 'IEEE8021X'.  I don't know if that's
>  significant, but it seems that it might be so.  And again, this is a fresh
>  configuration.
>
Comment 24 Cyril Brosch 2009-09-17 19:55:46 UTC
I'm sorry, the newest revision doesn't do it for me, too.
After some time I'm still asked again and again for the connection settings (the previous ones are now shown correctly).

Just for testing I once put in a wrong password, but the behaviour was the same, so maybe the connection doesn't even reach the stage where the password is checked.
Comment 25 Charlie Figura 2009-10-05 15:45:26 UTC
I upgraded to the Karmic beta over the weekend, and tried the network manager plasmoid again, version 0.9~svn1029786-0ubuntu1.  No joy - I'm still not able to connect.
Comment 26 Paulo Fidalgo 2009-11-06 12:17:14 UTC
With Fedora 11 (0.12.20090519svn.fc11), I still experience this problem.
Here is the log, with plasmoid:

Nov  6 11:06:16 bastard kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Nov  6 11:06:16 bastard NetworkManager: <info>  (wlan0): device state change: 2 -> 3 (reason 0)
Nov  6 11:06:16 bastard NetworkManager: <info>  (wlan0): supplicant interface state:  starting -> ready
Nov  6 11:06:46 bastard NetworkManager: <WARN>  wait_for_connection_expired(): Connection (2) /org/freedesktop/NetworkManagerSettings/1 failed to activate (timeout): (0) Connection was not provided by any settings service

altough with nm-applet, I can connect to the network without any problem.

Here is the log, of nm-applet connecting to the same network:

Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) starting connection 'Auto GUESTS'
Nov  6 11:07:15 bastard NetworkManager: <info>  (wlan0): device state change: 3 -> 4 (reason 0)
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Nov  6 11:07:15 bastard NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0/wireless): access point 'Auto GUESTS' has security, but secrets are required.
Nov  6 11:07:15 bastard NetworkManager: <info>  (wlan0): device state change: 5 -> 6 (reason 0)
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Nov  6 11:07:15 bastard NetworkManager: <info>  (wlan0): device state change: 6 -> 4 (reason 0)
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Nov  6 11:07:15 bastard NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0/wireless): connection 'Auto GUESTS' has security, and secrets exist.  No new secrets needed.
Nov  6 11:07:15 bastard NetworkManager: <info>  Config: added 'ssid' value 'GUESTS'
Nov  6 11:07:15 bastard NetworkManager: <info>  Config: added 'scan_ssid' value '1'
Nov  6 11:07:15 bastard NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-PSK'
Nov  6 11:07:15 bastard NetworkManager: <info>  Config: added 'psk' value '<omitted>'
Nov  6 11:07:15 bastard NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Nov  6 11:07:15 bastard NetworkManager: <info>  Config: set interface ap_scan to 1
Nov  6 11:07:15 bastard NetworkManager: <info>  (wlan0): supplicant connection state:  inactive -> scanning
Nov  6 11:07:18 bastard NetworkManager: <info>  (wlan0): supplicant connection state:  scanning -> associating
Nov  6 11:07:18 bastard kernel: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Nov  6 11:07:18 bastard NetworkManager: <info>  (wlan0): supplicant connection state:  associating -> associated

If any developer needs some more please just ask.

Best regards!
Comment 27 Will Stephenson 2009-11-06 12:36:23 UTC
The plasmoid is way out of date, you need knetworkmanager to have a chance.
Comment 28 Charlie Figura 2009-11-06 15:35:51 UTC
No, it's still screwed up.

I just did a clean install of Karmic on a new Dell Latitude E6400.  Karmic installs plasma-widget-networkmanagement by default.  There is NO knetworkmanager package listed at all.  If there's a different package I should be installing, I'll apparently need a ppa for it.

Under plasma-widget-networkmanagement, version 0.9~svn1029786+ag1-0ubuntu1, I get the following log messages in /var/log/daemon:


Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) starting connection 'WC_AP'                                            
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 3 -> 4 (reason 0)                                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...                             
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...                               
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.                                
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...                            
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)                                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0/wireless): access point 'WC_AP' has security, but secrets are required. 
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 5 -> 6 (reason 0)                                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.                              
Nov  6 08:25:36 nightfall NetworkManager: <WARN>  secrets_update_setting(): Failed to update connection secrets: 1 ipv4                     
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...                             
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...                               
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 6 -> 4 (reason 0)                                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.                                
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...                            
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)                                           
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0/wireless): connection 'WC_AP' has security, and secrets exist.  No new secrets needed.                                                        
Nov  6 08:25:36 nightfall NetworkManager: <info>  Config: added 'ssid' value 'WC_AP'                                                        
Nov  6 08:25:36 nightfall NetworkManager: <info>  Config: added 'scan_ssid' value '1'
Nov  6 08:25:36 nightfall NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-EAP'
Nov  6 08:25:36 nightfall NetworkManager: <debug> [1257517536.260915] nm_supplicant_config_add_option_with_type(): Key 'pairwise' and/or value 'WEP40 WEP104 WEP40 WEP104' invalid.
Nov  6 08:25:36 nightfall NetworkManager: <WARN>  nm_supplicant_config_add_setting_wireless_security(): Error adding pairwise to supplicant config.
Nov  6 08:25:36 nightfall NetworkManager: <WARN>  build_supplicant_config(): Couldn't add 802-11-wireless-security setting to supplicant config.
Nov  6 08:25:36 nightfall NetworkManager: <WARN>  real_act_stage2_config(): Activation (wlan0/wireless): couldn't build wireless configuration.
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 5 -> 9 (reason 9)
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) failed for access point (WC_AP)
Nov  6 08:25:36 nightfall NetworkManager: <info>  Marking connection 'WC_AP' invalid.
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) failed.
Nov  6 08:25:36 nightfall NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): device state change: 9 -> 3 (reason 0)
Nov  6 08:25:36 nightfall NetworkManager: <info>  (wlan0): deactivating device (reason: 0).
Comment 29 anton 2010-01-15 17:40:20 UTC
Is this bug really fixed? Looking through the history I can't see it as such. If it is, can you tell me in what level so I can verify if the fix is in KUbuntu Karmic (as I can't connect to WPA LEAP with kde)
Comment 30 Charlie Figura 2010-02-11 15:41:22 UTC
@Anton, and anyone else -
No, it's not fixed.  It still doesn't work.  I don't think I've been able to use knetworkmanager on our school PEAP/LEAP network since before knetworkmanager 0.7.  I've been using nm-applet quite successfully - the only problem is that it gets really annoying to have to unlock a kde wallet AND a gnome keyring.  But I've never gotten the kde network-manager plasmoid to work on PEAP/LEAP.  Not once, not ever.
Comment 31 Cyril Brosch 2010-09-06 18:47:15 UTC
I confirm that the bug is NOT fixed, I still can't connect to the eduroam network with the (newly official) NM plasmoid in SC 4.5.1. :-(
I tried all workarounds presented in this (seemingly duplicate) thread, nothin helped: https://bugs.kde.org/show_bug.cgi?id=209673
Comment 32 ohad cohen 2013-03-03 09:31:59 UTC
after upgrading to kde 4.10 i can't connect to wpa-protected wifi networks (i can connect to non-encripted networks)
i this bug is back?

kubuntu 12.10, kde 4.10 from the repository kubuntu-ppa-backports-quantal
Comment 33 Greg Laun 2013-05-31 16:19:59 UTC
I haven't been able to connect to a WPA2 network for at least two years on multiple laptops, although it has always worked with NetworkManager and Gnome.  I'm not sure whether the reason is that the PEAP auth methods aren't correctly sent (as the title of this bug report says), but all the bugs I can find about the networkmanager plasmoid not connected to WPA enterprise are marked as duplicates of this one, and the problem is defnitely *not* resolved.