[RFC 1/2] wpa_supp: ignore networks config for dedicated P2P management interface

Jouni Malinen j
Sun Mar 1 00:12:16 PST 2015


On Mon, Dec 01, 2014 at 12:57:03PM +0100, Arend van Spriel wrote:
> The P2P_DEVICE interface is only used for P2P management operations and
> as such should not have enabled networks. When sharing the same config
> file as the primary interface, that config may have configured networks.
> This patch assures these are ignored for the P2P_DEVICE interface.

> diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
> @@ -403,6 +404,8 @@ struct wpa_config * wpa_config_read(const char *name, struct wpa_config *cfgp)
>  				errors++;
>  				continue;
>  			}
> +			if (ignore_networks)
> +				continue;
>  			if (head == NULL) {
>  				head = tail = ssid;
>  			} else {

This leaks memory and breaks persistent P2P group storage (which is on
the P2P management interface with network blocks that have disabled=2).

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list