[PATCH v3] mesh: Display sae_group to result of status command

Jouni Malinen j
Sun Dec 14 10:12:42 PST 2014


On Thu, Dec 04, 2014 at 11:18:54AM +0900, Masashi Honma wrote:
> +int ap_ctrl_iface_wpa_get_sae_status(struct wpa_supplicant *wpa_s, char *buf,
> +				     size_t buflen, int verbose)

> +	sta = hapd->sta_list;
> +
> +	while (sta) {
> +		if (sta->sae != NULL && sta->sae->state == SAE_ACCEPTED) {
> +			ret = os_snprintf(pos, end - pos, "sae_group=%d\n",
> +					  sta->sae->group);
> +			if (ret < 0 || ret >= end - pos)
> +				return pos - buf;
> +			pos += ret;
> +			break;
> +		}
> +		sta = sta->next;
> +	}

This would print out the sae_group that the first STA entry in
SAE_ACCEPTED state happened to use. That may not match what other STAs
used.
 
I'm not sure it really makes much sense to try to have a single
sae_group entry in the STATUS output for mesh, just like there is not
much point in trying to do that in AP mode. And if a single value is
needed, that should really come from the local configuration and not the
peer entry.

If the negotiated SAE group needs to be exposed through control
interface for mesh cases, this should be done through some per-STA
means. I think I'll extend mesh to support the existing STA control
interface command since that is a trivial change and can provide other
additional benefits as well (like TX/RX packets/bytes statistics).

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list