[PATCH 2/3] mesh: Suppress new peer notification while processing
Bob Copeland
me
Thu Jan 22 06:17:41 PST 2015
On Thu, Jan 22, 2015 at 02:22:17PM +0900, Masashi Honma wrote:
> Our patch for mac80211 has already merged.
> http://git.kernel.org/cgit/linux/kernel/git/linville/wireless-testing.git/commit/?id=2ae70efcea7a695a62bb47170d3fb16674b8dbea
>
> The patch fires new peer notification frequently. The notification restarts SAE
> authentication when it will be received while SAE authentication is in progress.
>
> So this patch suppresses such undesired new peer notifications.
This makes sense, authsae already does something similar.
> diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
> index 51f82f5..cddeb01 100644
> --- a/wpa_supplicant/mesh_mpm.c
> +++ b/wpa_supplicant/mesh_mpm.c
> @@ -537,11 +537,12 @@ void wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
> int ret = 0;
>
> sta = ap_get_sta(data, addr);
> - if (!sta) {
> - sta = ap_sta_add(data, addr);
> - if (!sta)
> - return;
> - }
> + if (sta)
> + goto end;
> +
> + sta = ap_sta_add(data, addr);
> + if (!sta)
> + return;
... but I think it's a little odd to use goto here when it's not really
an error path. What about just suppressing them with something like:
/* ignore new peer events while SAE auth in progress */
if (sta && sta->sae && sta->sae->state != SAE_ACCEPTED)
return;
Would that work?
--
Bob Copeland %% http://bobcopeland.com/
More information about the Hostap
mailing list