]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
NAN: Fix A3 for unicast P2P2 USD
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 19 Dec 2024 09:18:50 +0000 (11:18 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 23 Dec 2024 10:43:29 +0000 (12:43 +0200)
According to the Wi-Fi Direct spec draft, address 3 in unicast USD
frames shall be set to the P2P Device Address of the sender (i.e., this
differs from the Wi-Fi Aware specification). Fix it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/common/nan_de.c

index 40ab9132021ae10ce9bf323f759f51f4e934958d..0e6b4d5fddcccdf0c7d2cdecdc1627375f9f1567 100644 (file)
@@ -1027,6 +1027,8 @@ static void nan_de_rx_subscribe(struct nan_de *de, struct nan_de_service *srv,
 
        if (srv->publish.solicited_multicast || !a3)
                a3 = network_id;
+       else if (srv->is_p2p)
+               a3 = de->nmi;
 
        nan_de_tx(de, srv->freq, 100,
                  srv->publish.solicited_multicast ? network_id : peer_addr,