[PATCH 4/4] P2P: Fix association with an AP that is not a P2P manager

Jouni Malinen j at w1.fi
Sun May 3 10:52:11 EDT 2015


On Tue, Apr 28, 2015 at 02:01:05PM +0300, Ilan Peer wrote:
> Do not add P2P IE when a non P2P interface is associating to an
> AP the is not a P2P manager, i.e., does set the managed bit in
> the P2P capability attribute.

Why? This description about managed bit is not accurate. That bit is not
even sent out by the WLAN AP and even if it were, it does not indicate
that the device sending it is a P2P manager; it indicates whether the
P2P Device is capable of being managed.

> diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
> @@ -2485,10 +2485,21 @@ static int p2p_assoc_req_ie_wlan_ap(struct p2p_data *p2p, const u8 *bssid,
> +	peer = p2p_get_device(p2p, bssid);
> +	if (!peer)
> +		return 0;

This breaks managed P2P behavior. A WLAN AP (not a P2P Device/GO) is not
supposed to have a peer entry.

> +	p2p_dbg(p2p, "P2P: managed assoc to " MACSTR" capa=0x%X",
> +		MAC2STR(bssid), peer->info.dev_capab);
> +
> +	if (!(peer->info.dev_capab & P2P_DEV_CAPAB_INFRA_MANAGED))
> +		return 0;

This makes no sense either since the WLAN AP would not even include P2P
Capability in the Beacon/Probe Response frames. It only includes the P2P
Manageability attribute.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list