[PATCH 18/18] NAN: Enlarge the SDF reserve for extra attributes

Andrei Otcheretianski andrei.otcheretianski at intel.com
Mon Oct 12 08:46:52 PDT 2026


The fixed 256 byte reserve for the attributes appended by the
add_extra_attrs() callback is too small. The callback adds the device
capability, the NAN availability of every map, the pairing attributes,
the NDC attribute and the ULW attribute, and the availability alone can
already exceed that when several channels with long time bitmaps are
advertised.

Double it to 512 bytes, which should be enough for now.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/common/nan_de.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/nan_de.c b/src/common/nan_de.c
index d0c866f0b7..3a1fddee3b 100644
--- a/src/common/nan_de.c
+++ b/src/common/nan_de.c
@@ -719,7 +719,7 @@ static size_t nan_de_sdf_attrs_put(struct wpabuf *buf, struct nan_de *de,
 
 	/* Reserve some additional space for extra attributes */
 	if (de->cb.add_extra_attrs && !srv->publish.orig_id)
-		len += 256;
+		len += 512;
 
 	len += attrs ? wpabuf_len(attrs) : 0;
 
-- 
2.53.0




More information about the Hostap mailing list