]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: ICMP: Use sta_find_mlo()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 8 May 2024 20:15:43 +0000 (22:15 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 12 Jul 2024 10:00:10 +0000 (13:00 +0300)
Using just sta_find() won't work for any link addresses
but the assoc link, use sta_find_mlo() instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wlantest/rx_ip.c

index b0fdd2068c967d1851a82d13b437353e26eeaa72..5dc186c45577192674c7090375698bcb390f1563 100644 (file)
@@ -85,7 +85,7 @@ static void rx_data_icmp(struct wlantest *wt, const u8 *bssid,
        if (sta_addr == NULL)
                return; /* FromDS broadcast ping */
 
-       sta = sta_find(bss, sta_addr);
+       sta = sta_find_mlo(wt, bss, sta_addr);
        if (sta == NULL) {
                add_note(wt, MSG_INFO, "No STA " MACSTR
                         " known for ICMP packet", MAC2STR(sta_addr));
@@ -93,7 +93,7 @@ static void rx_data_icmp(struct wlantest *wt, const u8 *bssid,
        }
 
        ping_update(wt, sta, hdr->type == ICMP_ECHO, src, dst, id, seq);
-       if (peer_addr && (sta = sta_find(bss, peer_addr)))
+       if (peer_addr && (sta = sta_find_mlo(wt, bss, peer_addr)))
                ping_update(wt, sta, hdr->type == ICMP_ECHO, src, dst, id, seq);
 }