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
This commit is contained in:

committed by
Thomas Haller

parent
a74e98bfc6
commit
7cb323d923
@@ -1551,7 +1551,7 @@ supplicant_iface_new_bss_cb (NMSupplicantInterface *iface,
|
|||||||
|
|
||||||
ap = nm_ap_new_from_properties (object_path, properties);
|
ap = nm_ap_new_from_properties (object_path, properties);
|
||||||
if (!ap) {
|
if (!ap) {
|
||||||
_LOGW (LOGD_WIFI_SCAN, "invalid AP properties received");
|
_LOGD (LOGD_WIFI_SCAN, "invalid AP properties received for %s", object_path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -491,9 +491,10 @@ nm_ap_new_from_properties (const char *supplicant_path, GVariant *properties)
|
|||||||
ap = (NMAccessPoint *) g_object_new (NM_TYPE_AP, NULL);
|
ap = (NMAccessPoint *) g_object_new (NM_TYPE_AP, NULL);
|
||||||
nm_ap_update_from_properties (ap, supplicant_path, properties);
|
nm_ap_update_from_properties (ap, supplicant_path, properties);
|
||||||
|
|
||||||
/* ignore APs with invalid BSSIDs */
|
/* ignore APs with invalid or missing BSSIDs */
|
||||||
addr = nm_ap_get_address (ap);
|
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)) {
|
|| nm_utils_hwaddr_matches (addr, -1, bad_bssid2, ETH_ALEN)) {
|
||||||
g_object_unref (ap);
|
g_object_unref (ap);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user