Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 07 Jun 2007 17:08:41 +0200, Jon Escombe <[EMAIL PROTECTED]> wrote: > > - "Dan Williams" <[EMAIL PROTECTED]> wrote: > >> > Attaching a new version of my patch, this checks whether a private >> key file is configured for the connection before attempting to read a >> password from the keyring. I believe this should suit both of the >> above 802.1X configuration types.. >> >> Wouldn't this not change the behavior for Tomas? Since his config >> doesn't show a private key file, it seems like your patch won't change >> behvior for him. >> >> I guess we should get him to test the patch first and see :) >> >> In any case, I've committed your fix since it's obviously correct. I >> added a bit to make sure we free the private_key_file variable since >> that's actually allocated memory. >> >> Dan >> > > Thanks, > > I believe Tomas is using 6.4, which doesn't work (for him) because it > always tries to get a password from the keyring. 6.5 includes a patch to > never get a password from the keyring (which I'm assuming would work for > Tomas - but breaks the private key password scenario). This *should* now > be the best of both worlds ;) > > Regards, > Jon. > ___ > NetworkManager-list mailing list > NetworkManager-list@gnome.org > http://mail.gnome.org/mailman/listinfo/networkmanager-list I am afraid I will not be able to confirm this (although I think ou are right) since it does not compile with my version of NM (0.6.4): applet-dbus-info.c: In function ‘nmi_dbus_get_key_for_network’: applet-dbus-info.c:193: error: ‘NM_AUTH_TYPE_LEAP’ undeclared (first use in this function) applet-dbus-info.c:193: error: (Each undeclared identifier is reported only once applet-dbus-info.c:193: error: for each function it appears in.) I tried to install the current svn, but it did not work for some reason (no idea what reason). I found the patch (http://mail.gnome.org/archives/networkmanager-list/2006-July/msg00034.html) that introduces LEAP into NM, but it does not work with my source anyway since it is far too huge. I hope it work anyway. Sorry and regards, Tomas ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
- "Jon Nettleton" <[EMAIL PROTECTED]> wrote: > On Thu, 2007-06-07 at 12:08 -0400, Dan Williams wrote: > > On Thu, 2007-06-07 at 16:42 +0100, Jon Escombe wrote: > > > Any thoughts on applying the device-link-race patch to 0.6.x? > > > > Working on that now; I'd rather figure out why nm_device_is_up doesn't > > return the correct value though... In any case, it's also better to > > move the sleep(1) to real_act_stage2_config() in > > nm-device-802-11-wireless.c after the ap_need_key() call since only > > wireless devices appear to need this. Can you try the attached patch > > and see if that works for you _instead_ of device-link-race.patch? > > > > Dan, > > your patch works for me. +1 Thanks, Jon. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 07 Jun 2007 17:08:41 +0200, Jon Escombe <[EMAIL PROTECTED]> wrote: > > - "Dan Williams" <[EMAIL PROTECTED]> wrote: > >> > Attaching a new version of my patch, this checks whether a private >> key file is configured for the connection before attempting to read a >> password from the keyring. I believe this should suit both of the >> above 802.1X configuration types.. >> >> Wouldn't this not change the behavior for Tomas? Since his config >> doesn't show a private key file, it seems like your patch won't change >> behvior for him. >> >> I guess we should get him to test the patch first and see :) >> >> In any case, I've committed your fix since it's obviously correct. I >> added a bit to make sure we free the private_key_file variable since >> that's actually allocated memory. >> >> Dan >> > > Thanks, > > I believe Tomas is using 6.4, which doesn't work (for him) because it > always tries to get a password from the keyring. 6.5 includes a patch to > never get a password from the keyring (which I'm assuming would work for > Tomas - but breaks the private key password scenario). This *should* now > be the best of both worlds ;) > > Regards, > Jon. I think you are right, I was about to test the former patch (the one that you linked to) but I screwed something up and now netwrok manager wont come up at all. As soon as I somehow fix this I will try your latest patch. Tomas ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 2007-06-07 at 12:37 -0400, Jon Nettleton wrote: > On Thu, 2007-06-07 at 12:08 -0400, Dan Williams wrote: > > On Thu, 2007-06-07 at 16:42 +0100, Jon Escombe wrote: > > > - "Dan Williams" <[EMAIL PROTECTED]> wrote: > > > > > > > > I believe Tomas is using 6.4, which doesn't work (for him) because > > > > it always tries to get a password from the keyring. 6.5 includes a > > > > patch to never get a password from the keyring (which I'm assuming > > > > would work for Tomas - but breaks the private key password scenario). > > > > This *should* now be the best of both worlds ;) > > > > > > > > Ah, ok. Can you test out latest SVN for 0.6.x and confirm that I didn't > > > > break anything when modifying your patch? > > > > > > > > Thanks, > > > > Dan > > > > > > Yep, the patch from SVN works fine here, thanks. > > > > > > Any thoughts on applying the device-link-race patch to 0.6.x? > > > > Working on that now; I'd rather figure out why nm_device_is_up doesn't > > return the correct value though... In any case, it's also better to > > move the sleep(1) to real_act_stage2_config() in > > nm-device-802-11-wireless.c after the ap_need_key() call since only > > wireless devices appear to need this. Can you try the attached patch > > and see if that works for you _instead_ of device-link-race.patch? > > > > Dan, > > your patch works for me. I have also found that this problem exists on > a couple of mac80211 stack drivers, as well as my prism54 fullmac card. I just tried running a quick test program on 2.6.20 with prism54 with inconclusive results... It just runs system("/sbin/ip link set dev eth1 [up/down]") and then uses the nm_device_is_up() function to print out status. Seems to work OK there. Grr. dev-link-wait.patch committed in revision 2579 just because. Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 2007-06-07 at 12:08 -0400, Dan Williams wrote: > On Thu, 2007-06-07 at 16:42 +0100, Jon Escombe wrote: > > - "Dan Williams" <[EMAIL PROTECTED]> wrote: > > > > > > I believe Tomas is using 6.4, which doesn't work (for him) because > > > it always tries to get a password from the keyring. 6.5 includes a > > > patch to never get a password from the keyring (which I'm assuming > > > would work for Tomas - but breaks the private key password scenario). > > > This *should* now be the best of both worlds ;) > > > > > > Ah, ok. Can you test out latest SVN for 0.6.x and confirm that I didn't > > > break anything when modifying your patch? > > > > > > Thanks, > > > Dan > > > > Yep, the patch from SVN works fine here, thanks. > > > > Any thoughts on applying the device-link-race patch to 0.6.x? > > Working on that now; I'd rather figure out why nm_device_is_up doesn't > return the correct value though... In any case, it's also better to > move the sleep(1) to real_act_stage2_config() in > nm-device-802-11-wireless.c after the ap_need_key() call since only > wireless devices appear to need this. Can you try the attached patch > and see if that works for you _instead_ of device-link-race.patch? > Dan, your patch works for me. I have also found that this problem exists on a couple of mac80211 stack drivers, as well as my prism54 fullmac card. Jon ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 2007-06-07 at 16:42 +0100, Jon Escombe wrote: > - "Dan Williams" <[EMAIL PROTECTED]> wrote: > > > > I believe Tomas is using 6.4, which doesn't work (for him) because > > it always tries to get a password from the keyring. 6.5 includes a > > patch to never get a password from the keyring (which I'm assuming > > would work for Tomas - but breaks the private key password scenario). > > This *should* now be the best of both worlds ;) > > > > Ah, ok. Can you test out latest SVN for 0.6.x and confirm that I didn't > > break anything when modifying your patch? > > > > Thanks, > > Dan > > Yep, the patch from SVN works fine here, thanks. > > Any thoughts on applying the device-link-race patch to 0.6.x? Working on that now; I'd rather figure out why nm_device_is_up doesn't return the correct value though... In any case, it's also better to move the sleep(1) to real_act_stage2_config() in nm-device-802-11-wireless.c after the ap_need_key() call since only wireless devices appear to need this. Can you try the attached patch and see if that works for you _instead_ of device-link-race.patch? Dan Index: src/nm-device-802-11-wireless.c === --- src/nm-device-802-11-wireless.c (revision 2577) +++ src/nm-device-802-11-wireless.c (working copy) @@ -2981,6 +2981,9 @@ return NM_ACT_STAGE_RETURN_POSTPONE; } + /* Some cards are dumb. Wait a second */ + sleep (1); + iface = nm_device_get_iface (dev); if (!supplicant_exec (self)) { ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
- "Dan Williams" <[EMAIL PROTECTED]> wrote: > > I believe Tomas is using 6.4, which doesn't work (for him) because > it always tries to get a password from the keyring. 6.5 includes a > patch to never get a password from the keyring (which I'm assuming > would work for Tomas - but breaks the private key password scenario). > This *should* now be the best of both worlds ;) > > Ah, ok. Can you test out latest SVN for 0.6.x and confirm that I didn't > break anything when modifying your patch? > > Thanks, > Dan Yep, the patch from SVN works fine here, thanks. Any thoughts on applying the device-link-race patch to 0.6.x? Regards, Jon. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 2007-06-07 at 16:08 +0100, Jon Escombe wrote: > - "Dan Williams" <[EMAIL PROTECTED]> wrote: > > > > Attaching a new version of my patch, this checks whether a private > > key file is configured for the connection before attempting to read a > > password from the keyring. I believe this should suit both of the > > above 802.1X configuration types.. > > > > Wouldn't this not change the behavior for Tomas? Since his config > > doesn't show a private key file, it seems like your patch won't change > > behvior for him. > > > > I guess we should get him to test the patch first and see :) > > > > In any case, I've committed your fix since it's obviously correct. I > > added a bit to make sure we free the private_key_file variable since > > that's actually allocated memory. > > > > Dan > > > > Thanks, > > I believe Tomas is using 6.4, which doesn't work (for him) because it always > tries to get a password from the keyring. 6.5 includes a patch to never get a > password from the keyring (which I'm assuming would work for Tomas - but > breaks the private key password scenario). This *should* now be the best of > both worlds ;) Ah, ok. Can you test out latest SVN for 0.6.x and confirm that I didn't break anything when modifying your patch? Thanks, Dan ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
- "Dan Williams" <[EMAIL PROTECTED]> wrote: > > Attaching a new version of my patch, this checks whether a private > key file is configured for the connection before attempting to read a > password from the keyring. I believe this should suit both of the > above 802.1X configuration types.. > > Wouldn't this not change the behavior for Tomas? Since his config > doesn't show a private key file, it seems like your patch won't change > behvior for him. > > I guess we should get him to test the patch first and see :) > > In any case, I've committed your fix since it's obviously correct. I > added a bit to make sure we free the private_key_file variable since > that's actually allocated memory. > > Dan > Thanks, I believe Tomas is using 6.4, which doesn't work (for him) because it always tries to get a password from the keyring. 6.5 includes a patch to never get a password from the keyring (which I'm assuming would work for Tomas - but breaks the private key password scenario). This *should* now be the best of both worlds ;) Regards, Jon. ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
On Thu, 2007-06-07 at 12:42 +0100, Jon Escombe wrote: > > Tomáš Hnyk wrote: > > > > >> > > >> So out of interest, what fields do you use in the configuration > > >> dialog? I am using "identity", "private key file," and "private key > > >> password". > > >> > > >> Regards, > > >> Jon. > > >> > > > The config windows should look like this: > > > http://eduroam.fjfi.cvut.cz/images/eduroam_linux2.png > > > i.e. identity, password and CA Certificate File > > > Regards, > > > Tomas > > > > > > > Ok, I'm thinking that the trigger to obtain the password from the > > keyring might be the presence of a "private key file" value in the > > gconf > > data? > > > > Regards, > > Jon. > > Attaching a new version of my patch, this checks whether a private key file > is configured for the connection before attempting to read a password from > the keyring. I believe this should suit both of the above 802.1X > configuration types.. Wouldn't this not change the behavior for Tomas? Since his config doesn't show a private key file, it seems like your patch won't change behvior for him. I guess we should get him to test the patch first and see :) In any case, I've committed your fix since it's obviously correct. I added a bit to make sure we free the private_key_file variable since that's actually allocated memory. Dan > Regards, > Jon. > > ___ > NetworkManager-list mailing list > NetworkManager-list@gnome.org > http://mail.gnome.org/mailman/listinfo/networkmanager-list ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NM 0.6.5 unable to reconnect to WPA2 network (first connection fine) - take 2
> Tomáš Hnyk wrote: > > >> > >> So out of interest, what fields do you use in the configuration > >> dialog? I am using "identity", "private key file," and "private key > >> password". > >> > >> Regards, > >> Jon. > >> > > The config windows should look like this: > > http://eduroam.fjfi.cvut.cz/images/eduroam_linux2.png > > i.e. identity, password and CA Certificate File > > Regards, > > Tomas > > > > Ok, I'm thinking that the trigger to obtain the password from the > keyring might be the presence of a "private key file" value in the > gconf > data? > > Regards, > Jon. Attaching a new version of my patch, this checks whether a private key file is configured for the connection before attempting to read a password from the keyring. I believe this should suit both of the above 802.1X configuration types.. Regards, Jon. diff -urN NetworkManager-0.6.5.original/nm-applet-0.6.5/src/applet-dbus-info.c NetworkManager-0.6.5/nm-applet-0.6.5/src/applet-dbus-info.c --- NetworkManager-0.6.5.original/nm-applet-0.6.5/src/applet-dbus-info.c 2007-04-19 19:01:13.0 +0100 +++ NetworkManager-0.6.5/nm-applet-0.6.5/src/applet-dbus-info.c 2007-06-07 12:12:41.0 +0100 @@ -152,6 +152,7 @@ char * temp = NULL; char * escaped_network; int we_cipher = -1; + char * private_key_file = NULL; g_return_val_if_fail (applet != NULL, NULL); g_return_val_if_fail (message != NULL, NULL); @@ -182,9 +183,14 @@ || !temp) new_key = TRUE; + nm_gconf_get_string_helper (applet->gconf_client, + GCONF_PATH_WIRELESS_NETWORKS, + "wpa_eap_private_key_file", escaped_network, &private_key_file); + /* Hack: 802.1x passwords are not stored in the keyring */ if (!new_key && - (we_cipher == NM_AUTH_TYPE_WPA_EAP || we_cipher == NM_AUTH_TYPE_LEAP)) + ((we_cipher == NM_AUTH_TYPE_WPA_EAP && !private_key_file) || + we_cipher == NM_AUTH_TYPE_LEAP)) { NMGConfWSO *gconf_wso; gconf_wso = nm_gconf_wso_new_deserialize_gconf (applet->gconf_client, ___ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list