From: Jouni Malinen Date: Wed, 28 Sep 2022 20:02:31 +0000 (+0300) Subject: wlantest: Verify Beacon frame MME even after Probe Response reception X-Git-Tag: hostap_2_11~1679 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc8a756ce4d00db4eab1f33f39f8ab73545fcd30;p=thirdparty%2Fhostap.git wlantest: Verify Beacon frame MME even after Probe Response reception rx_mgmt_beacon() was skipping all steps after a Probe Response frame from the AP had been processed. This is expected for the parts that were updating the bss entry information, but the checks for beacon protection should not be skipped in this manner. Skip onlu the updating parts while checking that beacon protection is used correctly to make this more useful. Signed-off-by: Jouni Malinen --- diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 1d0aef6ab..3372fd708 100644 --- a/wlantest/rx_mgmt.c +++ b/wlantest/rx_mgmt.c @@ -75,9 +75,9 @@ static void rx_mgmt_beacon(struct wlantest *wt, const u8 *data, size_t len) bss = bss_get(wt, mgmt->bssid); if (bss == NULL) return; - if (bss->proberesp_seen) - return; /* do not override with Beacon data */ - bss->capab_info = le_to_host16(mgmt->u.beacon.capab_info); + /* do not override with Beacon data */ + if (!bss->proberesp_seen) + bss->capab_info = le_to_host16(mgmt->u.beacon.capab_info); if (ieee802_11_parse_elems(mgmt->u.beacon.variable, len - offset, &elems, 0) == ParseFailed) { if (bss->parse_error_reported) @@ -88,7 +88,8 @@ static void rx_mgmt_beacon(struct wlantest *wt, const u8 *data, size_t len) return; } - bss_update(wt, bss, &elems, 1); + if (!bss->proberesp_seen) + bss_update(wt, bss, &elems, 1); mme = get_ie(mgmt->u.beacon.variable, len - offset, WLAN_EID_MMIE); if (!mme) {