[PATCH] WPS: make wps pin connection work with wpa_cli command

Jouni Malinen j at w1.fi
Sun Dec 14 11:14:33 EST 2014


On Thu, Nov 27, 2014 at 05:28:35PM +0100, Abdoulaye Berthe wrote:
> Network selection is not performed for all scan results
> making wps pin fail for command line connection attempts.
> This enables network selection if wpas_wps_searching is true.

Could you please describe the exact sequence of wpa_cli commands that do
not work? This cannot be in any way specific to wpa_cli, so I'd assume
this is identifying some kind of issue with the wpa_supplicant control
interface used for WPS PIN connection. However, such use cases work fine
in my tests, so I'm not sure I understood what this is trying to fix.

> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> @@ -1275,7 +1275,7 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
> -	if (own_request && wpa_s->scan_res_handler &&
> +	if (!wpas_wps_searching(wpa_s) && own_request && wpa_s->scan_res_handler &&
>  	    (wpa_s->own_scan_running || !wpa_s->external_scan_running)) {
>  		void (*scan_res_handler)(struct wpa_supplicant *wpa_s,
>  					 struct wpa_scan_results *scan_res);

This would skip use of the registered wpa_s->scan_res_handler during WPS
operation. While that may be reasonable for most cases, I'd like to
understand what wpa_s->scan_res_handler was set to in the case that you
are addressing.
 
-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list