[patch] Set WPS/WSC IE for ProbeRequests via WEXT driver wrapper

Jouni Malinen j
Thu Sep 22 10:42:22 PDT 2011


On Thu, Sep 22, 2011 at 06:53:06PM +0300, Andriy Tkachuk wrote:
> The following patch set the WPS/WSC IE for ProbeRequests (as required
> by WPS spec) via WEXT driver wrapper.

> diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
> @@ -989,6 +990,8 @@ int wpa_driver_wext_scan(void *priv, struct
> wpa_driver_scan_params *params)
>         os_memset(&iwr, 0, sizeof(iwr));
>         os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
> 
> +       wpa_driver_wext_set_gen_ie(priv, params->extra_ies,
> +                                        params->extra_ies_len);
>         if (ssid && ssid_len) {
>                 os_memset(&req, 0, sizeof(req));
>                 req.essid_len = ssid_len;

Hmm.. How would this be cleared? Could we accidentally leave behind some
values that really should not be used? For example, active PBC mode
configured by wpa_supplicant and then any scan on the system would claim
the device is in active PBC mode.. At minimum, this would need to be
cleared when processing the scan completed event (or scan timeout).

How commonly is this ioctl used to change Probe Request behavior? Do all
or even most drivers do that? The exact behavior is not really
documented very well and the only existing use case in wpa_supplicant
seems to be in configuring IEs to (Re)Association Request frames.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list