[PATCH v2] hostapd: RNR: skip own BSS by BSSID, not by short SSID
David Lang
david at lang.hm
Wed Dec 2 08:29:23 PST 2026
hostapd_eid_nr_db_len() and hostapd_eid_nr_db() skip every neighbor database
entry whose short SSID matches the reporting BSS, meaning to skip only the BSS's
own entry (added by hostapd_neighbor_set_own_report). That also drops every
same-ESS neighbor AP from the Reduced Neighbor Report (beacon IE 201), which are
the entries that matter for roaming. Skip only the entry whose BSSID equals
hapd->own_addr. This is the same check that is done for the Neighbor Report.
Signed-off-by: David Lang <david at lang.hm>
---
v2: shortened the code comment per review and moved the explanation into the
commit message. Use the same ether_addr_equal() argument order as the Neighbor
Report check.
src/ap/ieee802_11.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index e4caac085..784af3002 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -11324,7 +11324,8 @@ static size_t hostapd_eid_nr_db_len(struct hostapd_data *hapd,
if (!nr->nr || wpabuf_len(nr->nr) < 12)
continue;
- if (nr->short_ssid == hapd->conf->ssid.short_ssid)
+ /* Skip the reporting BSS's own entry */
+ if (ether_addr_equal(hapd->own_addr, nr->bssid))
continue;
/* Start a new element */
@@ -11793,7 +11794,8 @@ static u8 * hostapd_eid_nr_db(struct hostapd_data *hapd, u8 *eid,
if (!nr->nr || wpabuf_len(nr->nr) < 12)
continue;
- if (nr->short_ssid == hapd->conf->ssid.short_ssid)
+ /* Skip the reporting BSS's own entry */
+ if (ether_addr_equal(hapd->own_addr, nr->bssid))
continue;
/* Start a new element */
--
2.47.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hostapd-RNR-skip-own-BSS-by-BSSID-not-by-short-SSID.patch
Type: text/x-diff
Size: 1937 bytes
Desc:
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20261202/d247369f/attachment.bin>
More information about the Hostap
mailing list