Key annoyance

Valentine Sinitsyn Valentine.Sinitsyn at usu.ru
Fri Sep 29 13:15:05 CEST 2006


Hi again,

> Because restarting KNM helped with that repetitive key dialog, I
> thought this is KNM's issue.
No - I think it's because KNM reports that it have security data for 
"known" networks when it starts and NM doesn't force you to enter a new 
key. When you press "Cancel" button, KNM reports "GetKeyError" and 
security data inside NM is destroyed. NM always force you to enter new 
key if it sees KNM haven't supplied security data for the network.

> But, as I was [re]implementing key re-requesting scheme for
>> KNM, let me give you some advices:
>>   - First of all, make sure you use NM 0.6.4 or cvs HEAD - earlier 
>> versions ask you for a new key every time acquiring address via DHCP 
>> fails. 0.6.4 upward employ more clever scheme but it also fails
>> sometimes.
> 0.6.4 here. I know that earlier versions had some problems with it, but
> I am still asked far too many times for the new key, while the old one
> is OK.
As I've said, new scheme also fail sometimes. If you are using Open 
authentication and you haven't received a DHCP response, it's a clean 
sign that you have bad key and the packets are dropped since they can't 
be decrypted - or you just have bad connection and packets are dropped 
since they are corrupted - you can't say for sure. Checking signal 
strength is not an answer - now I'm on 75% signal Wi-Fi but was able to 
get DHCP response from the third attempt.

>> - The reason for "forgetting" key when you press Cancel button is
>> that in this case KNM sends GetKeyError message to NM daemon which is
>> also used to indicate error conditions like "unable to load a key
>> from Wallet/Gnome keyring, please enter it again". This thing annoys
>> me also but until there will be no way to distinguish between Cancel
>> butotn and error, this is only reasonable behavior. As a workaround,
>> you can reopen KNM - this would help. A better solution would be
>> filing a bug in the NM Bugzilla, I guess.
> I see, I will.
Ok, could you send us a number please.


>>> PS. Even more annyoing is the fact that turning the NM stuff off,
>>> setting the key & essid manually via iwconfig, and then doing
>>> dhclient ath0 worked like a charm...
>> Sure. And that is what surprises me. All: could dhcdbd be an issue?
> It seems so, although it's rather related to short NM's timeouts. 
> With NM I get:
> 
> NetworkManager: <information>    Activation (ath0) Beginning DHCP transaction.
> NetworkManager: <information>    Activation (ath0) Stage 3 of 5 (IP Configure Start) complete.
> NetworkManager: <information>    DHCP daemon state is now 12 (successfully started) for interface ath0
> dhclient: wifi0: unknown hardware address type 801
> dhclient: can't create /var/lib/dhclient/dhclient-ath0.leases: No such file or directory
> NetworkManager: <information>    DHCP daemon state is now 1 (starting) for interface ath0
> dhclient: wifi0: unknown hardware address type 801
> dhclient: Trying medium "-link0 -link1 -link2" 1
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 5
> dhclient: Trying medium "link0 link1" 0
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 5
> dhclient: Trying medium "-link0 -link1 -link2" 1
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 6
> dhclient: Trying medium "link0 link1" 0
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 6
> dhclient: Trying medium "-link0 -link1 -link2" 1
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
> dhclient: Trying medium "link0 link1" 0
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
> dhclient: Trying medium "-link0 -link1 -link2" 1
> dhcdbd: dhco_parse_option_settings: no new option definition for medium
> NetworkManager: <information>    DHCP daemon state is now 7 (unknown) for interface ath0
> dhclient: DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 9
> NetworkManager: <information>    Device 'ath0' DHCkey:D768-60AB-E0E7-52C9-E185-9F86-11P transaction took too long (>45s), stopping it.
> dhclient: There is already a pid file /var/run/dhclient-ath0.pid with pid 6032
> dhclient: killed old client process, removed PID file
> dhclient: wifi0: unknown hardware address type 801
> dhclient: can't create /var/lib/dhclient/dhclient-ath0.leases: No such file or directory
> dhclient: wifi0: unknown hardware address type 801
> NetworkManager: <information>    Activation (ath0) Stage 4 of 5 (IP Configure Timeout) scheduled...
> NetworkManager: <information>    DHCP daemon state is now 14 (normal exit) for interface ath0
> NetworkManager: <information>    DHCP daemon state is now 14 (normal exit) for interface ath0
> NetworkManager: <information>    Activation (ath0) Stage 4 of 5 (IP Configure Timeout) started...
> NetworkManager: <debug info>     [1159524854.990793] real_act_stage4_ip_config_timeout (): Activation (ath0/wireless): could not get IP configuration info for 'NETGEAR', asking for new key.
> NetworkManager: <information>    Activation (ath0) New wireless user key requested for network 'NETGEAR'.
> 
> When I manually do iwconfig essid & key, and then do dhclient ath0, I also get
> something similar, i.e. DHCPDISCOVER struggles a bit, but in the end it
> manages to retrieve DHCPOFFER. It works quite quick, so I don't understand
> why NM timeouts, although it happend a couple of times that NM connected
> nice and quick, too. Usually though, NM timeouts, however my 'manual' 
> connecting  (with iwconfig & dhclient) always works. Here's what dhclient run
> manually shows:
> 
> cromo at kromka:~$ sudo dhclient ath0
> There is already a pid file /var/run/dhclient.pid with pid 5821
> killed old client process, removed PID file
> Internet Systems Consortium DHCP Client V3.0.4
> Copyright 2004-2006 Internet Systems Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/sw/dhcp/
> 
> wifi0: unknown hardware address type 801
> wifi0: unknown hardware address type 801
> Listening on LPF/ath0/00:16:ce:11:9b:55
> Sending on   LPF/ath0/00:16:ce:11:9b:55
> Sending on   Socket/fallback
> DHCPREQUEST on ath0 to 255.255.255.255 port 67
> DHCPREQUEST on ath0 to 255.255.255.255 port 67
> DHCPREQUEST on ath0 to 255.255.255.255 port 67
> Trying medium "-link0 -link1 -link2" 1
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 4
> Trying medium "link0 link1" 0
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 4
> Trying medium "-link0 -link1 -link2" 1
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 4
> Trying medium "link0 link1" 0
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 4
> Trying medium "-link0 -link1 -link2" 1
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
> Trying medium "link0 link1" 0
> DHCPDISCOVER on ath0 to 255.255.255.255 port 67 interval 8
> DHCPOFFER from 192.168.0.1
> DHCPREQUEST on ath0 to 255.255.255.255 port 67
> DHCPACK from 192.168.0.1
> bound to 192.168.0.10 -- renewal in 1423 seconds.
Alas, there is no timestamps in the log you've sent - but the idea is 
clear. I wouldn't say NM has fort timeout - 45secs to bring iface up, 20 
seconds to associate...


Take care,
Valentine


More information about the kde-networkmanager mailing list