diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2014-12-02 19:42:23 +0200 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-12-04 06:04:32 -0800 |
| commit | d469524ab80b02f14dd18097c8460cbf5d29926e (patch) | |
| tree | be4cbc7de80dbc54b7b38bdb8942b063ba1bfc5c | |
| parent | 9a66ea033894e3d691c69c120dfc98e4729cd319 (diff) | |
| download | android_external_wpa_supplicant_8-d469524ab80b02f14dd18097c8460cbf5d29926e.tar.gz android_external_wpa_supplicant_8-d469524ab80b02f14dd18097c8460cbf5d29926e.tar.bz2 android_external_wpa_supplicant_8-d469524ab80b02f14dd18097c8460cbf5d29926e.zip | |
Allow a BSS entry with all-zeros BSSID to expire
wpa_bss_in_use() used to determine that a BSS with BSSID of
00:00:00:00:00:00 is in use in almost every case since either
wpa_s->bssid or wpa_s->pending_bssid was likely to be cleared. This
could result in a corner case of a BSS entry remaining in the BSS table
indefinitely if one was added there with a (likely bogus) address of
00:00:00:00:00:00. Fix this by ignore wpa_s->bssid and
wpa_s->pending_bssid if the BSSID in the BSS table entry is
00:00:00:00:00:00.
In theory, that address is a valid BSSID, but it is unlikely to be used
in any production AP, so the potential expiration of a BSS entry with
that address during a connection attempt would not be a concern
(especially when a new scan would be enough to recover from that).
CRs-Fixed: 766537
Git-commit: 44177b69e8854177044aad4c57cf9cce8269b306
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Ie70a0aa2ba3a8b942f7f9798b1d15d87391547a8
| -rw-r--r-- | wpa_supplicant/bss.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index d731a801..73d3ed65 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -306,8 +306,9 @@ static int wpa_bss_known(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) static int wpa_bss_in_use(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) { return bss == wpa_s->current_bss || - os_memcmp(bss->bssid, wpa_s->bssid, ETH_ALEN) == 0 || - os_memcmp(bss->bssid, wpa_s->pending_bssid, ETH_ALEN) == 0; + (!is_zero_ether_addr(bss->bssid) && + (os_memcmp(bss->bssid, wpa_s->bssid, ETH_ALEN) == 0 || + os_memcmp(bss->bssid, wpa_s->pending_bssid, ETH_ALEN) == 0)); } |
