Try to find the BSS entry that contains the most likely current
information for the target BSS. This is mainly needed to avoid some
unusual behavior with APs changing their Beacon frame information in a
manner that shows up in automated testing, but this might help with some
more dynamic real world uses as well, so better do the BSS entry search
for the newest entry.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
struct wpa_bss *bss;
int res;
- bss = wpa_bss_get_bssid(wpa_s, dst);
+ bss = wpa_bss_get_bssid_latest(wpa_s, dst);
if (!bss && !freq) {
wpa_printf(MSG_WARNING,
"ANQP: Cannot send query without BSS freq info");
}
}
if (bss == NULL)
- bss = wpa_bss_get_bssid(wpa_s, dst);
+ bss = wpa_bss_get_bssid_latest(wpa_s, dst);
pos = wpabuf_head(resp);
end = pos + wpabuf_len(resp);
u8 query_resp_len_limit = 0;
freq = wpa_s->assoc_freq;
- bss = wpa_bss_get_bssid(wpa_s, dst);
+ bss = wpa_bss_get_bssid_latest(wpa_s, dst);
if (bss)
freq = bss->freq;
if (freq <= 0)