wifi: don't accept any BSSes with missing BSSIDs (rh #1276426)

The supplicant should never be sending us BSSes without BSSIDs.

https://bugzilla.redhat.com/show_bug.cgi?id=1276426
(cherry picked from commit 7cb323d923)
This commit is contained in:
Dan Williams 2015-11-10 11:11:30 -06:00 committed by Thomas Haller
parent ccc4b1dd54
commit ebe3320e62
2 changed files with 4 additions and 3 deletions

View file

@ -1875,7 +1875,7 @@ supplicant_iface_new_bss_cb (NMSupplicantInterface *iface,
merge_scanned_ap (self, ap);
g_object_unref (ap);
} else
_LOGW (LOGD_WIFI_SCAN, "invalid AP properties received");
_LOGD (LOGD_WIFI_SCAN, "invalid AP properties received for %s", object_path);
/* Remove outdated access points */
schedule_scanlist_cull (self);

View file

@ -476,9 +476,10 @@ nm_ap_new_from_properties (const char *supplicant_path, GVariant *properties)
nm_ap_set_supplicant_path (ap, supplicant_path);
/* ignore APs with invalid BSSIDs */
/* ignore APs with invalid or missing BSSIDs */
addr = nm_ap_get_address (ap);
if ( nm_utils_hwaddr_matches (addr, -1, bad_bssid1, ETH_ALEN)
if ( !addr
|| nm_utils_hwaddr_matches (addr, -1, bad_bssid1, ETH_ALEN)
|| nm_utils_hwaddr_matches (addr, -1, bad_bssid2, ETH_ALEN)) {
g_object_unref (ap);
return NULL;