[PATCH 02/58] NAN_DE: Fix SSI parsing in SDA (move to start)
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Thu Feb 19 12:24:18 PST 2026
Service Specific Information (SSI) inside SDA attribute is not required
to have WFA OUI header. The specification allows any data in SSI field.
Service protocol type and OUI WFA header are mandatory only for SSI
field inside SDEA attributes.
Fix the parsing accordingly.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
src/common/nan_de.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index 0233c4caae..b12a257ba7 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -1438,14 +1438,13 @@ static void nan_de_rx_sda(struct nan_de *de, const u8 *peer_addr, const u8 *a3,
if (end - sda < 1)
return;
flen = *sda++;
+
if (end - sda < flen)
return;
- if (flen >= 4 && WPA_GET_BE24(sda) == OUI_WFA) {
- srv_proto_type = sda[3];
- ssi = sda + 4;
- ssi_len = flen - 4;
- wpa_printf(MSG_DEBUG, "NAN: Service Protocol Type %d",
- srv_proto_type);
+
+ if (flen) {
+ ssi = sda;
+ ssi_len = flen;
wpa_hexdump(MSG_MSGDUMP, "NAN: ssi", ssi, ssi_len);
}
sda += flen;
--
2.52.0
More information about the Hostap
mailing list