]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: MLO support for decrypting 4-address frames
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 31 Aug 2023 11:32:55 +0000 (14:32 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 31 Aug 2023 11:32:55 +0000 (14:32 +0300)
Search the A1/A2 values in 4-address frames using the MLO enabled
functions to allow appropriate STA entries to be located when these
frames are used with MLO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wlantest/rx_data.c

index f1d46495e9d6c8e0f67918e443c1de12c7d25b23..cc47d0b375ba1a0efab25abc270b31d1753220bf 100644 (file)
@@ -462,7 +462,7 @@ static void rx_data_bss_prot(struct wlantest *wt,
            (WLAN_FC_TODS | WLAN_FC_FROMDS)) {
                bss = bss_find(wt, hdr->addr1);
                if (bss) {
-                       sta = sta_find(bss, hdr->addr2);
+                       sta = sta_find_mlo(wt, bss, hdr->addr2);
                        if (sta) {
                                sta->counters[
                                        WLANTEST_STA_COUNTER_PROT_DATA_TX]++;
@@ -470,7 +470,8 @@ static void rx_data_bss_prot(struct wlantest *wt,
                        if (!sta || !sta->ptk_set) {
                                bss2 = bss_find(wt, hdr->addr2);
                                if (bss2) {
-                                       sta2 = sta_find(bss2, hdr->addr1);
+                                       sta2 = sta_find_mlo(wt, bss2,
+                                                           hdr->addr1);
                                        if (sta2 && (!sta || sta2->ptk_set)) {
                                                bss = bss2;
                                                sta = sta2;
@@ -481,7 +482,7 @@ static void rx_data_bss_prot(struct wlantest *wt,
                        bss = bss_find(wt, hdr->addr2);
                        if (!bss)
                                return;
-                       sta = sta_find(bss, hdr->addr1);
+                       sta = sta_find_mlo(wt, bss, hdr->addr1);
                }
        } else if (fc & WLAN_FC_TODS) {
                bss = bss_get(wt, hdr->addr1);