diff options
Diffstat (limited to 'debian/patches/13-validate_mac_addr.patch')
| -rw-r--r-- | debian/patches/13-validate_mac_addr.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/13-validate_mac_addr.patch b/debian/patches/13-validate_mac_addr.patch new file mode 100644 index 00000000..47a81e19 --- /dev/null +++ b/debian/patches/13-validate_mac_addr.patch @@ -0,0 +1,33 @@ +--- network-manager-0.6.5.orig/src/nm-device-802-11-wireless.c ++++ network-manager-0.6.5/src/nm-device-802-11-wireless.c +@@ -3439,6 +3439,20 @@ + } + + static gboolean ++has_valid_ether_addr (NMAccessPoint *ap) ++{ ++ struct ether_addr *addr; ++ int i; ++ ++ addr = nm_ap_get_address (ap); ++ for (i = 0 ; i < ETH_ALEN; i++) ++ if (addr->ether_addr_octet[i] != 0) ++ return TRUE; ++ ++ return FALSE; ++} ++ ++static gboolean + process_scan_results (NMDevice80211Wireless *dev, + const guint8 *res_buf, + guint32 res_buf_len) +@@ -3474,7 +3488,8 @@ + + /* Merge previous AP */ + if (ap) { +- add_new_ap_to_device_list (dev, ap); ++ if (has_valid_ether_addr (ap)) ++ add_new_ap_to_device_list (dev, ap); + nm_ap_unref (ap); + ap = NULL; + } |