[PATCH 10/15] NAN: Don't drop protected dual schedule updates

Andrei Otcheretianski andrei.otcheretianski at intel.com
Thu Oct 8 09:05:19 PDT 2026


nan_is_naf() wrongly rejected protected dual schedule update NAFs.
In addition a "return" was missing in nan_action_substitute_src()
resulting in a confusing "NAN: NAF from unknown peer" print.
Fix it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/nan/nan.c      | 1 +
 src/nan/nan_util.c | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/nan/nan.c b/src/nan/nan.c
index 1f77ba40f5..275d5fd233 100644
--- a/src/nan/nan.c
+++ b/src/nan/nan.c
@@ -2582,6 +2582,7 @@ static void nan_action_substitute_src(struct nan_data *nan,
 				   MAC2STR(peer->nmi_addr), MAC2STR(mgmt->sa));
 
 			os_memcpy((void *)mgmt->sa, peer->nmi_addr, ETH_ALEN);
+			return;
 		}
 	}
 
diff --git a/src/nan/nan_util.c b/src/nan/nan_util.c
index 6a7b79f327..8086bcf74c 100644
--- a/src/nan/nan_util.c
+++ b/src/nan/nan_util.c
@@ -389,9 +389,14 @@ bool nan_is_naf(const struct ieee80211_mgmt *mgmt, size_t len)
 
 	subtype = mgmt->u.action.u.naf.subtype;
 
+	/*
+	 * NDP and NDL subtypes are sent protected when there is a secure NDP
+	 * with the peer, so they may also arrive as Protected Dual of Public
+	 * Action frames.
+	 */
 	if (mgmt->u.action.category != WLAN_ACTION_PUBLIC &&
 	    !(subtype >= NAN_SUBTYPE_DATA_PATH_REQUEST &&
-	      subtype <= NAN_SUBTYPE_DATA_PATH_TERMINATION &&
+	      subtype <= NAN_SUBTYPE_SCHEDULE_UPDATE_NOTIF &&
 	      mgmt->u.action.category == WLAN_ACTION_PROTECTED_DUAL)) {
 		wpa_printf(MSG_DEBUG, "NAN: Invalid action category for NAF");
 		return false;
-- 
2.53.0




More information about the Hostap mailing list