[patch] incorrectly detected roaming with WPA...



I was at my brother's house for part of last week, and he's using WPA in
a location where there are a lot of APs visible, all on different
networks (i.e. suburbia).  Occasionally NM would try to associate to the
wrong AP, and it'd log a message about roaming between two APs.  When I
look up the addresses, they've got unique ESSIDs.  So here's a patch to
prohibit it.  I'm pretty sure it's not the *best* answer, but it does
allow it to connect correctly.

--- NetworkManager/src/nm-device-802-11-wireless.c.essid	2006-06-01 12:45:49.000000000 -0400
+++ NetworkManager/src/nm-device-802-11-wireless.c	2006-06-01 12:45:57.000000000 -0400
@@ -153,6 +153,8 @@
 	NMActRequest *			req;
 	struct ether_addr		new_bssid;
 	const struct ether_addr	*old_bssid;
+	const *new_essid;
+	const char *old_essid;
 
 	g_return_if_fail (self != NULL);
 
@@ -172,7 +174,10 @@
 	/* Get the current BSSID.  If it is valid but does not match the stored value, update it. */
 	nm_device_802_11_wireless_get_bssid (self, &new_bssid);
 	old_bssid = nm_ap_get_address (ap);
-	if (nm_ethernet_address_is_valid (&new_bssid) && !nm_ethernet_addresses_are_equal (&new_bssid, old_bssid))
+
+	new_essid = nm_device_802_11_wireless_get_essid(self);
+	old_essid = nm_ap_get_essid(ap);
+	if (nm_ethernet_address_is_valid (&new_bssid) && !nm_ethernet_addresses_are_equal (&new_bssid, old_bssid) && !strcmp(old_essid, new_essid))
 	{
 		NMData *	app_data;
 		gboolean	automatic;

-- 
  Peter



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]