[PATCH] wpa_supplicant: fix call to preauth candidate list generation

Jouni Malinen j
Sun Oct 30 13:41:51 PDT 2011

On Mon, Jul 18, 2011 at 12:13:27AM +0300, Guy Eilam wrote:
> Moved the call to the processing of the scan results for
> RSN pre-authentication candidates to an earlier position.
> This call was ignored most of the times due to a skip that
> is issues whenever the supplicant decides that there is no
> need to roam.

> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> @@ -949,10 +949,10 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
>  		skip = !wpa_supplicant_need_to_roam(wpa_s, selected, ssid,
>  						    scan_res);
>  		wpa_scan_results_free(scan_res);
> +		wpa_supplicant_rsn_preauth_scan_results(wpa_s);
>  		if (skip)
>  			return 0;
>  		wpa_supplicant_connect(wpa_s, selected, ssid);
> -		wpa_supplicant_rsn_preauth_scan_results(wpa_s);

Like Dan pointed out, this reverts part of an earlier fix (that call has
to happen after wpa_supplicant_connect() for RSN module to know the
SSID). As such, I dropped this patch.

However, it is fine to add another call to
wpa_supplicant_rsn_preauth_scan_results() to be done in the skip-roaming
case because at that point, wpa_supplicant_connect() has already been
called for the first association to the network and SSID should already
be configured. This is now in hostap.git and I would expect it to
address the issues you reported without breaking the initial RSN
pre-authentication candidate update.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list