Summary: | wpa_supplicant 0.5.0 apparently fails to set wep key ? | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Stefano <raistlin> |
Component: | Current packages | Assignee: | Mobile Herd (OBSOLETE) <mobile+disabled> |
Status: | VERIFIED UPSTREAM | ||
Severity: | normal | CC: | uberlord |
Priority: | High | ||
Version: | 2005.0 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Stefano
2005-12-25 10:36:58 UTC
(In reply to comment #0) > When associating to a WEP AP, wpa_supplicant apparently fails to set the > encryption mode. There is nothing in this bug report which indicates that wpa_supplicant fails to set the WEP key. Please reopen once you've provided more information. cough. I don't know how to show you that this happens, however: Starting up wpa_supplicant: # /etc/init.d/net.eth1 start * Starting eth1 * Running preup function * Starting wpa_supplicant on eth1 ... Initializing interface 'eth1' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface '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=0 eapol_version=1 ap_scan=1 Line: 9 - start of a new network block ssid - hexdump_ascii(len=9): 52 61 69 73 74 57 4c 41 4e RaistWLAN key_mgmt: 0x4 auth_alg: 0x1 group: 0x4 wep_key0 - hexdump(len=13): [REMOVED] wep_tx_keyidx=0 (0x0) priority=5 (0x5) Line: 19 - start of a new network block ssid - hexdump_ascii(len=10): 73 6e 5f 77 6c 61 6e 5f 61 70 sn_wlan_ap proto: 0x1 key_mgmt: 0x2 pairwise: 0x8 group: 0x8 PSK (ASCII passphrase) - hexdump_ascii(len=33): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Priority group 5 id=0 ssid='RaistWLAN' Priority group 0 id=1 ssid='sn_wlan_ap' Initializing interface (2) 'eth1' EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: KEY_RX entering state NO_KEY_RECEIVE EAPOL: SUPP_BE entering state INITIALIZE EAP: EAP entering state DISABLED EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 SIOCGIWRANGE: WE(compiled)=19 WE(source)=16 enc_capa=0x0 capabilities: key_mgmt 0x0 enc 0x3 Own MAC address: 00:04:23:83:1f:97 wpa_driver_wext_set_wpa wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_countermeasures wpa_driver_wext_set_drop_unencrypted Setting scan request: 0 sec 100000 usec Using existing control interface directory. Added interface eth1 Daemonize.. [ ok ] * eth1 connected to "RaistWLAN" at CE:NS:OR:ED:00 * Bringing up eth1 * 192.168.XXX.Y/24 [ ok ] * Adding routes * default gw 192.168.XXX.ZZZ ... [ ok ] raistmobile ~ # iwconfig eth1 IEEE 802.11b ESSID:"RaistWLAN" Nickname:"ipw2100" Mode:Managed Frequency:2.437 GHz Access Point: CE:NS:OR:ED:00 Bit Rate=11 Mb/s Tx-Power:off Retry min limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=100/100 Signal level=-46 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 While as you may see in the config above, the key is set. If I manually set the key AFTER starting wpa_supplicant everything works. Is this a proof enough ? ;-) Sorry for having been hermetic. I can not debug any of this if you continue to provide this little information. Please provide unmodified output of running wpa_supplicant manually along with your wpa_supplicant.conf file. If you don't feel like providing your real configuration details create a minimal test setup use that for the report. (In reply to comment #3) > I can not debug any of this if you continue to provide this little information. Well... > Please provide unmodified output of running wpa_supplicant You have it right above. I just removed my AP hardware address. Is this a bother to you ? > manually along with > your wpa_supplicant.conf file. You didn't ask for it, and it is included almost line-by-line in debug output, however: # cat /etc/wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 eapol_version=1 ap_scan=1 network={ ssid="RaistWLAN" key_mgmt=NONE auth_alg=OPEN group=WEP104 wep_key0=<KEY REMOVED BY ME> wep_tx_keyidx=0 priority=5 } The only editing has been done to remove my key from wpa_supplicant.conf, and my AP hardware address above. Frankly, I don't see a reason for your unfriendly answer. But anybody is granted a right to be nervous at times :) Additional note, because perhaps I didn't make myself completely clear: if I manually run wpa_supplicant -ieth1 -Dwext -c/etc/wpa_supplicant.conf the interface is correctly configured. The issue appears when I run it from within /etc/init.d/net.eth1 start, using: modules_eth1=( "wpa_supplicant" ) wpa_supplicant_eth1="-Dwext -B -dd" wpa_timeout_eth1=60 Sorry if the fact I was using the startup scripts to launch it was not really clear. (In reply to comment #5) > Additional note, because perhaps I didn't make myself completely clear: if I > manually run wpa_supplicant -ieth1 -Dwext -c/etc/wpa_supplicant.conf the > interface is correctly configured. Reassigning to Roy, then. You're using the stable baselayout-1.11 series - does it work using 1.12.0_pre12? Just upgraded (duh). Same weird behavior as above. Just use this wpa_supplicant config wpa_supplicant_eth1="-Dwext" (In reply to comment #9) > Just use this wpa_supplicant config > > wpa_supplicant_eth1="-Dwext" Same as above. Just FYI: # ps aux | grep wpa root 26286 0.0 0.1 3152 844 ? Ss 18:14 0:00 /sbin/wpa_supplicant -Dwext -c/etc/wpa_supplicant.conf -W -P/var/run/wpa_supplicant-eth1.pid -B -ieth1 root 26295 0.0 0.0 2024 396 ? Ss 18:14 0:00 /bin/wpa_cli -a/sbin/wpa_cli.action -ieth1 -P/var/run/wpa_cli-eth1.pid -B root 26773 0.0 0.1 1640 488 pts/2 R+ 18:14 0:00 grep wpa Try running it manually with those flags with the flags -W and -B. If you use the -W flag then you have to launch wpa_cli otherwise wpa_supplicant won't associate as it's waiting for wpa_cli. OK, the problem is larger than I thought. In fact, even running manually, the key is not set (contrary to what I said above in comment #5): ---------- # wpa_supplicant -ieth1 -Dwext -c/etc/wpa_supplicant.conf -dd Initializing interface 'eth1' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface '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=0 eapol_version=1 ap_scan=1 Line: 9 - start of a new network block ssid - hexdump_ascii(len=9): 52 61 69 73 74 57 4c 41 4e RaistWLAN key_mgmt: 0x4 auth_alg: 0x1 group: 0x4 wep_key0 - hexdump(len=13): [REMOVED] wep_tx_keyidx=0 (0x0) priority=5 (0x5) Line: 19 - start of a new network block ssid - hexdump_ascii(len=10): 73 6e 5f 77 6c 61 6e 5f 61 70 sn_wlan_ap proto: 0x1 key_mgmt: 0x2 pairwise: 0x8 group: 0x8 PSK (ASCII passphrase) - hexdump_ascii(len=33): [REMOVED] PSK (from passphrase) - hexdump(len=32): [REMOVED] Priority group 5 id=0 ssid='RaistWLAN' Priority group 0 id=1 ssid='sn_wlan_ap' Initializing interface (2) 'eth1' EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: KEY_RX entering state NO_KEY_RECEIVE EAPOL: SUPP_BE entering state INITIALIZE EAP: EAP entering state DISABLED EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 SIOCGIWRANGE: WE(compiled)=19 WE(source)=16 enc_capa=0x0 capabilities: key_mgmt 0x0 enc 0x3 Own MAC address: 00:04:23:83:1f:97 wpa_driver_wext_set_wpa wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0 wpa_driver_wext_set_countermeasures wpa_driver_wext_set_drop_unencrypted Setting scan request: 0 sec 100000 usec Added interface eth1 Wireless event: cmd=0x8b06 len=8 RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added State: DISCONNECTED -> SCANNING Starting AP scan (broadcast SSID) Wireless event: cmd=0x8b15 len=20 Wireless event: new AP: 00:0f:3d:e0:c9:fb State: SCANNING -> ASSOCIATED Associated to a new BSS: BSSID=00:0f:3d:e0:c9:fb No keys have been configured - skip key clearing Network configuration found for the current AP WPA: clearing AP WPA IE WPA: clearing AP RSN IE WPA: clearing own WPA/RSN IE EAPOL: External notification - portControl=ForceAuthorized Associated with 00:0f:3d:e0:c9:fb WPA: Association event - clear replay counter EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 EAPOL: External notification - portEnabled=1 EAPOL: SUPP_PAE entering state S_FORCE_AUTH EAPOL: SUPP_BE entering state IDLE Cancelling authentication timeout State: ASSOCIATED -> COMPLETED CTRL-EVENT-CONNECTED - Connection to 00:0f:3d:e0:c9:fb completed (auth) RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added Scan timeout - try to get results Received 182 bytes of scan results (1 BSSes) Scan results: 1 Selecting BSS from priority group 5 0: 00:0f:3d:e0:c9:fb ssid='RaistWLAN' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 skip - no WPA/RSN IE selected non-WPA AP 00:0f:3d:e0:c9:fb ssid='RaistWLAN' Already associated with the selected AP. ---------- Tried with -B and -W, but no change (except for demonizing, and waiting for the cli... but the key still is not set). This time I didn't edit out MAC addresses, so if brix needs to chime in he can do so :-) (In reply to comment #12) > OK, the problem is larger than I thought. In fact, even running manually, the > key is not set (contrary to what I said above in comment #5): Not a baselayout bug then, re-assigning to mobile. BTW: just tried a connection to a WPA network, works like a charm (also with the init scripts). So the problem is just on WEP. (In reply to comment #14) > BTW: just tried a connection to a WPA network, works like a charm (also with > the init scripts). So the problem is just on WEP. I have spent this afternoon doing a thorough test of WEP along with wpa_supplicant-0.5.0, and can not reproduce your problem. As there is not much more I can do, please report this upstream. Here is the mail I received back from Jouni Malinen: "The last debug log in that case seems to be showing the driver reporting association before the scan results are received. This seems to cause wpa_supplicnat not to configure static WEP keys. The Intel driver is somewhat too eager (IMHO) to associate with random networks, so I would recommend testing this by first setting the SSID to something unused with iwconfig (e.g., "iwconfig eth1 essid not-in-use") and then starting wpa_supplicant. Please also test this with ap_scan=2 mode instead of ap_scan=1 to avoid the issue with scan results not being received from the driver early enough." The first suggestion did not work, while the second one (setting ap_scan=2) fixed my problem flawlessly. So this bug can be closed for me :) I get the same problems, but I'm using the hostap driver instead. Please check my posting on the forums at: http://forums.gentoo.org/viewtopic-t-451917.html I've tried the suggestions at the end of this thread, but to no avail: iwconfig wlan0 essid testing does not set or change the essid for wlan0, and setting ap_scan to 2 or 0 causes wpa_supplicant not to associate with any network at all, not even net1 or net4 (see the forum post cited above), which require no authentication. My version of wpa_supplicant is 0.5.2 I don't suppose anyone has an idea of what I should do? This issue has been affecting me for weeks now. -Ricardo- I have solved this matter in my own way, not mentioned here in this bug report. For more information, see my latest post in the forum thread mentioned in Comment #17. -Ricardo- |