Bug 203602 - WPA2 Enterprise PEAP invalid connection
Summary: WPA2 Enterprise PEAP invalid connection
Status: RESOLVED FIXED
Alias: None
Product: knetworkmanager
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-12 20:05 UTC by Mark
Modified: 2009-08-16 21:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2009-08-12 20:05:07 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Ubuntu Packages

Since switching from the network-manager plasma widget to knetworkmanager,  I am no longer able to connect to my WPA2 enterprise WIFI connection.  In the knetworkmanager access point list, the WPA2 connection shows up incorrectly as WEP.  If I click on the access point to connect, nothing happens, the menu just stays in place as if it wasn't clicked.  If I go to "Manage Connections" and delete the access point entry from the "wireless" tab upon clicking the connection in the networkmanager window then brings up the "Add Network Connection" window.  Upon entering the connection data, the connection still never attempts to connect.  It shows "Never" under "Last Used"  in the management window.
Comment 1 Will Stephenson 2009-08-13 14:03:19 UTC
Please give the exact svn revision of your package.  Anything under 1010000 suffers from bugs 195824 and 201993.
Comment 2 Mark 2009-08-14 00:57:27 UTC
I just compiled revision 1011092 and now the connection properly displays as WPA, but clicking on the connection to connect does nothing.  The menu stays open as if it were not even clicked.
Comment 3 Will Stephenson 2009-08-15 07:35:31 UTC
See http://userbase.kde.org/NetworkManagement

Please enclose the NetworkManager log including the point at which you started knetworkmanager, and the DBus view of the knetworkmanager connection (+ the same connection created with nm-applet, if possible).
Comment 4 Mark 2009-08-16 00:11:33 UTC
Here is the NetworkManager log when starting/connecting with knetworkmanager:

Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) starting connection 'pezed' 
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 3 -> 4 (reason 0) 
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled... 
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...   
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled... 
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.      
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...  
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)                 
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0/wireless): access point 'pezed' has security, but secrets are required.                                                                                                        
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 5 -> 6 (reason 0)                          
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.             
Aug 15 17:41:08 duolap NetworkManager: <WARN>  secrets_update_setting(): Failed to update connection secrets: 1 ipv4    
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...            
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 6 -> 4 (reason 0)
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0/wireless): connection 'pezed' has security, and secrets exist.  No new secrets needed.
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'ssid' value 'pezed'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'scan_ssid' value '1'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-EAP'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'password' value '<omitted>'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'eap' value 'PEAP LEAP'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'fragment_size' value '1300'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'phase2' value 'auth=MSCHAPV2'
Aug 15 17:41:08 duolap NetworkManager: <info>  Config: added 'ca_path' value '/etc/ssl/certs'
Aug 15 17:41:08 duolap NetworkManager: <debug> [1250372468.425153] nm_supplicant_config_add_option_with_type(): Key 'ca_path2' and/or value '/etc/ssl/certs' invalid.
Aug 15 17:41:08 duolap NetworkManager: <WARN>  add_string_val(): Error adding ca_path2 to supplicant config.
Aug 15 17:41:08 duolap NetworkManager: <WARN>  build_supplicant_config(): Couldn't add 802-11-wireless-security setting to supplicant config.
Aug 15 17:41:08 duolap NetworkManager: <WARN>  real_act_stage2_config(): Activation (wlan0/wireless): couldn't build wireless configuration.
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 5 -> 9 (reason 9)
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) failed for access point (pezed)
Aug 15 17:41:08 duolap NetworkManager: <info>  Marking connection 'pezed' invalid.
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) failed.
Aug 15 17:41:08 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): device state change: 9 -> 3 (reason 0)
Aug 15 17:41:08 duolap NetworkManager: <info>  (wlan0): deactivating device (reason: 0).


NetworkManager log when using nm-applet:

Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) starting connection 'Auto pezed' 
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): device state change: 3 -> 4 (reason 0)     
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled... 
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...   
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled... 
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.      
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...  
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)                 
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0/wireless): access point 'Auto pezed' has security, but secrets are required.                                                                                                   
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): device state change: 5 -> 6 (reason 0)                          
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.             
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...            
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) started...              
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): device state change: 6 -> 4 (reason 0)                          
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...          
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.               
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) starting...           
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): device state change: 4 -> 5 (reason 0)                          
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0/wireless): connection 'Auto pezed' has security, and secrets exist.  No new secrets needed.                                                                                    
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'ssid' value 'pezed'                                       
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'scan_ssid' value '1'                                      
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'key_mgmt' value 'WPA-EAP'                                 
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'password' value '<omitted>'                               
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'eap' value 'PEAP'                                         
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'fragment_size' value '1300'                               
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'phase2' value 'auth=MSCHAPV2'                             
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: added 'identity' value 'mark'                                    
Aug 15 17:42:59 duolap NetworkManager: <info>  Activation (wlan0) Stage 2 of 5 (Device Configure) complete.             
Aug 15 17:42:59 duolap NetworkManager: <info>  Config: set interface ap_scan to 1                                       
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  scanning -> disconnected          
Aug 15 17:42:59 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  disconnected -> scanning          
Aug 15 17:43:01 duolap wpa_supplicant[2627]: CTRL-EVENT-SCAN-RESULTS                                                    
Aug 15 17:43:01 duolap wpa_supplicant[2627]: Trying to associate with 00:11:22:33:44:58 (SSID='pezed' freq=2462 MHz)    
Aug 15 17:43:01 duolap wpa_supplicant[2627]: Association request to the driver failed                                   
Aug 15 17:43:01 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  scanning -> associating           
Aug 15 17:43:01 duolap kernel: [ 3843.252731] wlan0: authenticate with AP 00:11:22:33:44:58                             
Aug 15 17:43:01 duolap kernel: [ 3843.255292] wlan0: authenticated                                                      
Aug 15 17:43:01 duolap kernel: [ 3843.255299] wlan0: associate with AP 00:11:22:33:44:58                                
Aug 15 17:43:01 duolap wpa_supplicant[2627]: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully (based on lower layer success)                                                                                                    
Aug 15 17:43:01 duolap wpa_supplicant[2627]: WPA: EAPOL-Key Replay Counter did not increase - dropping packet           
Aug 15 17:43:01 duolap wpa_supplicant[2627]: Associated with 00:11:22:33:44:58                                          
Aug 15 17:43:01 duolap kernel: [ 3843.257786] wlan0: RX AssocResp from 00:11:22:33:44:58 (capab=0x431 status=0 aid=1)   
Aug 15 17:43:01 duolap kernel: [ 3843.257793] wlan0: associated                                                         
Aug 15 17:43:01 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  associating -> associated         
Aug 15 17:43:02 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  associated -> 4-way handshake     
Aug 15 17:43:02 duolap wpa_supplicant[2627]: WPA: Key negotiation completed with 00:11:22:33:44:58 [PTK=TKIP GTK=TKIP]  
Aug 15 17:43:02 duolap wpa_supplicant[2627]: CTRL-EVENT-CONNECTED - Connection to 00:11:22:33:44:58 completed (reauth) [id=0 id_str=]                                                                                                           
Aug 15 17:43:02 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  4-way handshake -> group handshake                                                                                                                        
Aug 15 17:43:02 duolap NetworkManager: <info>  (wlan0): supplicant connection state:  group handshake -> completed      
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'pezed'.                                                                                  
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.          
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...          
Aug 15 17:43:02 duolap NetworkManager: <info>  (wlan0): device state change: 5 -> 7 (reason 0)                          
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Beginning DHCP transaction (timeout in 45 seconds)    
Aug 15 17:43:02 duolap dhclient: Internet Systems Consortium DHCP Client V3.1.2                                         
Aug 15 17:43:02 duolap dhclient: Copyright 2004-2008 Internet Systems Consortium.                                       
Aug 15 17:43:02 duolap dhclient: All rights reserved.                                                                   
Aug 15 17:43:02 duolap dhclient: For info, please visit http://www.isc.org/sw/dhcp/                                     
Aug 15 17:43:02 duolap dhclient:                                                                                        
Aug 15 17:43:02 duolap NetworkManager: <info>  dhclient started with pid 4435                                           
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP6 Configure Get) scheduled...         
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.           
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP6 Configure Get) started...
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP6 Configure Get) complete.
Aug 15 17:43:02 duolap NetworkManager: <info>  DHCP: device wlan0 state changed normal exit -> preinit
Aug 15 17:43:02 duolap dhclient: Listening on LPF/wlan0/00:1c:bf:b0:a9:3e
Aug 15 17:43:02 duolap dhclient: Sending on   LPF/wlan0/00:1c:bf:b0:a9:3e
Aug 15 17:43:02 duolap dhclient: Sending on   Socket/fallback
Aug 15 17:43:02 duolap dhclient: DHCPREQUEST of 192.168.0.148 on wlan0 to 255.255.255.255 port 67
Aug 15 17:43:02 duolap dhclient: DHCPACK of 192.168.0.148 from 192.168.0.1
Aug 15 17:43:02 duolap dhclient: bound to 192.168.0.148 -- renewal in 2838 seconds.
Aug 15 17:43:02 duolap NetworkManager: <info>  DHCP: device wlan0 state changed preinit -> reboot
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) scheduled...
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) started...
Aug 15 17:43:02 duolap NetworkManager: <info>    address 192.168.0.148
Aug 15 17:43:02 duolap NetworkManager: <info>    prefix 24 (255.255.255.0)
Aug 15 17:43:02 duolap NetworkManager: <info>    gateway 192.168.0.1
Aug 15 17:43:02 duolap NetworkManager: <info>    nameserver '192.168.0.1'
Aug 15 17:43:02 duolap NetworkManager: <info>    domain name 'pezed.lan'
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) scheduled...
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) complete.
Aug 15 17:43:02 duolap NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) started...
Aug 15 17:43:02 duolap avahi-daemon[2620]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.148.
Aug 15 17:43:02 duolap avahi-daemon[2620]: New relevant interface wlan0.IPv4 for mDNS.
Aug 15 17:43:02 duolap avahi-daemon[2620]: Registering new address record for 192.168.0.148 on wlan0.IPv4.
Aug 15 17:43:03 duolap NetworkManager: <info>  (wlan0): device state change: 7 -> 8 (reason 0)
Aug 15 17:43:03 duolap NetworkManager: <info>  Policy set 'Auto pezed' (wlan0) as default for routing and DNS.
Aug 15 17:43:03 duolap NetworkManager: <info>  Activation (wlan0) successful, device activated.
Aug 15 17:43:03 duolap NetworkManager: <info>  Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.


dbus log using knetworkmanager:

a{sa{sv}} {"802-11-wireless" = {"mode" = "infrastructure"],
"security" = "802-11-wireless-security"],
"ssid" = {112, 101, 122, 101, 100}]}], 
"802-11-wireless-security" =  {"key-mgmt" = "wpa-eap"]}], 
"802-1x" = a{sv} {"eap" =  {"peap", "leap"}], 
"identity" = "mark"], 
"phase2-auth" = "mschapv2"], 
"system-ca-certs" = true]}], 
"connection" =  {"autoconnect" = true], 
"id" = "pezed"], 
"type" = "802-11-wireless"], 
"uuid" = "bd5e7d80-821b-4039-a7fd-5ed61dc26001"]}]}]


dbus log using nm-applet:

a{sa{sv}} 
"802-1x" = a{sv} {"eap" = {"peap"}], 
"phase2-auth" = "mschapv2"], 
"identity" = "mark"]}], 
"802-11-wireless-security" =  {"key-mgmt" =  "wpa-eap"]}],
"connection" =  {"uuid" = "121a52f8-8d98-4054-bee8-b68e08dbe83b"],
"id" =  "Auto pezed"], "type" = "802-11-wireless"], 
"timestamp" =  1250373303]}], 
"802-11-wireless" = {"mode" =  "infrastructure"], 
"seen-bssids" = {"00:11:22:33:44:58"}], 
"ssid" =  {112, 101, 122, 101, 100}], 
"security" =  "802-11-wireless-security"]}]}]


I think the problem may be with CA cert handling in knetworkmanager.  When I uncheck "Use system CA certs" in the connection properties window, the setting does not stick.  Immediately opening the connection properites window again shows the "CA certs" checkbox checked again.
Comment 5 Will Stephenson 2009-08-16 12:08:47 UTC
SVN commit 1011891 by wstephens:

* Fix restoring PEAP inner secrets
* correct DBUS representation of PEAP version, fixing rejected
  connections that set a PEAP version.
* Add 'Automatic' PEAP version to the combo that leaves PEAP version
  choice to NetworkManager
* Correctly save and restore 'Use System CA Certs' for PEAP and TTLS
  connections
* Remove commented out dead code from WpaEapWidget
* Update the settings hand edits diff.  This was committed without the
  dbus edits recently.

CCBUG: 203602


 M  +3 -3      backends/NetworkManager/settings/802-1xdbus.cpp  
 M  +3 -3      libs/internals/schemas/802-1x.kcfg  
 M  +872 -31   libs/internals/settings_hand_edits.diff  
 M  +5 -0      libs/ui/security/eapmethodpeapbase.ui  
 M  +5 -3      libs/ui/security/peapwidget.cpp  
 M  +2 -0      libs/ui/security/ttlswidget.cpp  
 M  +0 -48     libs/ui/security/wpaeapwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1011891
Comment 6 Will Stephenson 2009-08-16 12:13:44 UTC
Please test.

I still have to fix the spurious 'leap' eap method KNM is sending alongside the correct 'peap'.

I am concerned because NM is rejecting Use CA Certs on connect and not on NM startup.  The value sent as the system CA Cert path comes from NM itself, and since it thinks the path (/etc/ssl/certs) is invalid, this may indicate that NM on Ubuntu is misconfigured. 

Can you check with nm-applet if the NM log contains

nm_supplicant_config_add_option_with_type(): Key 'ca_path2' and/or value
'/etc/ssl/certs' invalid.

on connect if you set Use CA Certs?
Comment 7 Will Stephenson 2009-08-16 17:14:38 UTC
The extra 'leap' is fixed in r1011990.
Comment 8 Mark 2009-08-16 20:27:36 UTC
Compiled r1011990 and was able to successfully connect!

I tried to get nm-applet to trigger the NM certs error without success.  In nm-applet you are forced to choose a cert, there is no check box to use system CA certs such as in KNM.  If there is anything else I can help with please let me know.
Comment 9 Will Stephenson 2009-08-16 21:07:10 UTC
Brilliant!

In parallel, I've been updating the SUSE NetworkManager package itself and noticed that "Use System CA Certs" is a feature added to NM 0.7.1 for SLED 11.  So I will probably have to ship patches to distributors that permanently disable "Use System CA Certs" where they are shipping vanilla 0.7.1.