Commit 901f7c82 authored by Dan Williams's avatar Dan Williams Committed by Dan Williams

2004-10-08 Dan Williams <dcbw@redaht.com>

	* src/NetworkManagerDevice.c
		- Be a bit more robust about link checking, ie make sure that
			the WEP key we were given actually has some data in it


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@199 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 823ac2ce
2004-10-08 Dan Williams <dcbw@redaht.com>
* src/NetworkManagerDevice.c
- Be a bit more robust about link checking, ie make sure that
the WEP key we were given actually has some data in it
2004-10-08 Dan Williams <dcbw@redhat.com>
* info-daemon/NetworkManagerInfo.c (main):
......
......@@ -1274,8 +1274,19 @@ void nm_device_activate_wireless_wait_for_link (NMDevice *dev)
* are using Open System authentication. Also, not all drivers return an invalid MAC address
* when the card cannot communicate with the access point.
*/
/* For the link check, ensure that:
* 1) a classic link check is good, ie does the card report a valid associated AP MAC address and is it
* receiving WEP-enabled packets OK if WEP is on
* 2) we have a best access point, and if that AP is encrypted, that we have a valid encryption key for it
*
* If either of these things fail, we try other access points or we try to retrieve another encrpytion key
* from the user.
*
*/
while ( !HAVE_LINK (dev, bad_crypt_packets)
|| (best_ap && (nm_ap_get_encrypted (best_ap) && !nm_ap_get_enc_key_source (best_ap)))) /* No link if best AP is encrypted but we don't have a key yet */
|| (best_ap && (nm_ap_get_encrypted (best_ap) &&
(!nm_ap_get_enc_key_source (best_ap) || !strlen (nm_ap_get_enc_key_source (best_ap))))))
{
if ((best_ap = nm_device_get_best_ap (dev)))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment