Rate limit NEW_PEER_CANDIDATE events
silverjam opened this issue · comments
Jason Mobarak commented
Per comment from Thomas when we were reviewing the wpa_supplicant mesh support patches to send upstream:
> /* TODO: verify this peer matches MBSS before inserting! */
> /* TODO: process in SAE, which will allocate station if authenticated. */
> /* just immediately allocate peer for now, and insert into driver */
> diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
> index 160d05a..c3febcb 100644
> --- a/wpa_supplicant/mesh_mpm.c
> +++ b/wpa_supplicant/mesh_mpm.c
> @@ -306,6 +306,7 @@ wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
> struct mesh_conf *conf = wpa_s->ifmsh->mconf;
> struct hostapd_data *data = wpa_s->ifmsh->bss[0];
> struct sta_info *sta;
> + struct wpa_ssid *ssid = wpa_s->current_ssid;
> int ret = 0;
>
> sta = ap_get_sta(data, addr);
> @@ -348,6 +349,12 @@ wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
> return;
> }
>
> + if (ssid && ssid->no_auto_peer) {
> + wpa_msg(wpa_s, MSG_INFO, "will not initiate new peer link with "
> + MACSTR " because of no_auto_peer", MAC2STR(addr));
> + return;
> + }
This needs to be ratelimited, unless there is a way to supress
NEW_PEER_CANDIDATE events?