diff options
author | Dan Williams <dcbw@redhat.com> | 2010-06-17 22:35:03 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-06-17 22:39:45 -0700 |
commit | f774312a5ed9117f28ee2f5da0ca12ae402e45d2 (patch) | |
tree | 149ebcef95fb952289d675959d7debe8ade4093f | |
parent | ed32287cf183890c80691efa07a2ce51983033f0 (diff) |
wifi: fix updating of IBSS BSSIDs
First by is OR-ed with 0x02, it won't always equal 0x02.
-rw-r--r-- | src/nm-device-wifi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 7bc242c4a9..84c65917b9 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -917,8 +917,10 @@ periodic_update (NMDeviceWifi *self) struct ether_addr bssid = { {0x0, 0x0, 0x0, 0x0, 0x0, 0x0} }; nm_device_wifi_get_bssid (self, &bssid); - /* 0x02 is the first byte of IBSS BSSIDs */ - if ( (bssid.ether_addr_octet[0] == 0x02) + /* 0x02 means "locally administered" and should be OR-ed into + * the first byte of IBSS BSSIDs. + */ + if ( (bssid.ether_addr_octet[0] & 0x02) && nm_ethernet_address_is_valid (&bssid)) nm_ap_set_address (priv->current_ap, &bssid); } |