From 38bf08ec44f7180322c43a8bc16b756ff74ea2ea Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 27 Oct 2014 19:46:48 +0100 Subject: [PATCH] wifi: Empty AP BSSID is NULL, not an invalid address Since 3a54d050 the AP address is not a gbyte[], but a char *. The fake AP BSSID fixup could trigger an assertion failure: Oct 26 11:14:45 goatlord.localdomain NetworkManager[540]: nm_ethernet_address_is_valid: assertion 'addr != NULL' failed https://bugzilla.gnome.org/show_bug.cgi?id=739258 Fixes: 3a54d050985d6ef2067b025571910a8ccd3cbd57 --- src/devices/wifi/nm-device-wifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 14d68c73ca..c78eb61f84 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -3021,7 +3021,7 @@ activation_success_handler (NMDevice *device) * the BSSID off the card and fill in the BSSID of the activation AP. */ nm_platform_wifi_get_bssid (ifindex, bssid); - if (!nm_ethernet_address_is_valid (nm_ap_get_address (ap), -1)) { + if (!nm_ap_get_address (ap)) { char *bssid_str = nm_utils_hwaddr_ntoa (bssid, ETH_ALEN); nm_ap_set_address (ap, bssid_str); g_free (bssid_str);