Make sure updated BSS entry does not get added twice to the list
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 27 Sep 2013 13:00:50 +0000 (16:00 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 27 Sep 2013 13:00:50 +0000 (16:00 +0300)
commit25b65a142dec4770a79f7a17867f0db93111f843
treeca765803ee0656c058859636a7120f7ea7456f43
parenta3cbf82e6d2b494e4c5e87b4101af2f941482400
Make sure updated BSS entry does not get added twice to the list

When the BSS table is being updated based on new scan results, a BSS
entry could end up getting added into last_scan_res list multiple times
if the scan results from the driver includes duplicated values. This
should not happen with driver_nl80211.c since it filter outs duplicates,
but in theory, other driver wrappers could indicate such scan results.
Anyway, it is safer to make sure this cannot happen by explicitly
verifying the last_scan_res list before adding an updated BSS entry
there. A duplicated entry in the list could potentially result in freed
memory being used if there is large enough number of BSSes in the scan
results to cause removal of old BSS entries.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/bss.c