ubus.c: only add nr entries matching our own SSID

The preferred neighbors list may have BSSIDs with different SSIDs.  Add
only those that match the interface's SSID.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
Eneas U de Queiroz 2022-07-18 09:28:17 -03:00 committed by Nick Hainke
parent 181549f7bb
commit e596ff1317

View file

@ -2236,7 +2236,7 @@ int ap_get_nr(struct blob_buf* b_local, struct dawn_mac own_bssid_addr, const ch
for (struct mac_entry_s* n = preferred_list; n; n = n->next_mac) {
dawn_mutex_require(&ap_array_mutex);
ap* j = ap_array_get_ap(n->mac);
if (j)
if (j && !strncmp((char*)j->ssid, ssid, SSID_MAX_LEN))
blobmsg_add_nr(b_local, j);
}