mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 15:30:27 +01:00
wifi: fix updating of IBSS BSSIDs
First by is OR-ed with 0x02, it won't always equal 0x02.
This commit is contained in:
parent
4e02c67a94
commit
89572383a3
1 changed files with 4 additions and 2 deletions
|
|
@ -966,8 +966,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue