2007-08-14 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerAP.c
		- (nm_ap_new_from_properties): ignore BSSs with invalid BSSIDs.  Today
			I encountered a BSS that wasn't just hiding it's ESSID, it was
			setting the BSSID to all 0s.  That confused the heck out of NM,
			plus it's useless and probably out-of-spec.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2684 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2007-08-15 01:31:53 +00:00
parent 2413ebf771
commit 66c11dd988
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2007-08-14 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
- (nm_ap_new_from_properties): ignore BSSs with invalid BSSIDs. Today
I encountered a BSS that wasn't just hiding it's ESSID, it was
setting the BSSID to all 0s. That confused the heck out of NM,
plus it's useless and probably out-of-spec.
2007-08-14 Dan Williams <dcbw@redhat.com>
* callouts/Makefile.am

View file

@ -491,6 +491,9 @@ nm_ap_new_from_properties (GHashTable *properties)
{
NMAccessPoint *ap;
GTimeVal cur_time;
const struct ether_addr * addr;
const char bad_bssid1[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
const char bad_bssid2[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
g_return_val_if_fail (properties != NULL, NULL);
@ -498,6 +501,14 @@ nm_ap_new_from_properties (GHashTable *properties)
g_hash_table_foreach (properties, foreach_property_cb, ap);
/* ignore APs with invalid BSSIDs */
addr = nm_ap_get_address (ap);
if ( (memcmp (addr->ether_addr_octet, bad_bssid1, ETH_ALEN))
|| (memcmp (addr->ether_addr_octet, bad_bssid2, ETH_ALEN))) {
g_object_unref (ap);
return NULL;
}
g_get_current_time (&cur_time);
nm_ap_set_last_seen (ap, cur_time.tv_sec);