]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Use MLD address for traffic tests
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Mon, 22 May 2023 19:34:09 +0000 (22:34 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 15 Jun 2023 14:34:02 +0000 (17:34 +0300)
In case of MLD use the MLD address.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
hostapd/ctrl_iface.c

index b5a1c8a5d698516c158e0da4de0ac8f7db0d49da..f90eb22c45b4bbb5c1bd0f188617ff649a606a71 100644 (file)
@@ -1836,6 +1836,7 @@ static int hostapd_ctrl_iface_data_test_config(struct hostapd_data *hapd,
        int enabled = atoi(cmd);
        char *pos;
        const char *ifname;
+       const u8 *addr = hapd->own_addr;
 
        if (!enabled) {
                if (hapd->l2_test) {
@@ -1856,7 +1857,11 @@ static int hostapd_ctrl_iface_data_test_config(struct hostapd_data *hapd,
        else
                ifname = hapd->conf->iface;
 
-       hapd->l2_test = l2_packet_init(ifname, hapd->own_addr,
+#ifdef CONFIG_IEEE80211BE
+       if (hapd->conf->mld_ap)
+               addr = hapd->mld_addr;
+#endif /* CONFIG_IEEE80211BE */
+       hapd->l2_test = l2_packet_init(ifname, addr,
                                        ETHERTYPE_IP, hostapd_data_test_rx,
                                        hapd, 1);
        if (hapd->l2_test == NULL)