aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/p2p/p2p.h5
-rw-r--r--src/p2p/p2p_i.h1
-rw-r--r--wpa_supplicant/p2p_supplicant.c16
3 files changed, 18 insertions, 4 deletions
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 3c439f3..a60974f 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -1726,4 +1726,9 @@ int p2p_prepare_channel(struct p2p_data *p2p, unsigned int force_freq);
void p2p_set_config_timeout(struct p2p_data *p2p, u8 go_timeout,
u8 client_timeout);
+/**
+ * p2p_group_get_interface_addr - Get the interface address of a P2P group
+ * @group: P2P group context from p2p_group_init()
+ */
+const u8 *p2p_group_get_interface_addr(struct p2p_group *group);
#endif /* P2P_H */
diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h
index d254818..9e3fd6f 100644
--- a/src/p2p/p2p_i.h
+++ b/src/p2p/p2p_i.h
@@ -557,7 +557,6 @@ struct p2p_noa_desc {
};
/* p2p_group.c */
-const u8 * p2p_group_get_interface_addr(struct p2p_group *group);
u8 p2p_group_presence_req(struct p2p_group *group,
const u8 *client_interface_addr,
const u8 *noa, size_t noa_len);
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index d8d72da..42c062f 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -4137,9 +4137,19 @@ void wpas_p2p_rx_action(struct wpa_supplicant *wpa_s, const u8 *da,
if (wpa_s->global->p2p == NULL)
return;
- if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
- wpa_printf(MSG_DEBUG, "Discard RX action event on P2P "
- "GO/CLI iface. P2P Device interface will handle it");
+ /*
+ * Discard an Rx duplication created by mac80211 rx path
+ * when receiving public action frames with mismatched BSSID
+ * In case of separate GO interface such public action frames (prov disc
+ * dev disc, invites) these should be handled by the P2P dev interface
+ */
+ if (wpa_s->p2p_group_interface == P2P_GROUP_INTERFACE_GO &&
+ category == WLAN_ACTION_PUBLIC &&
+ wpa_s->p2p_group &&
+ os_memcmp(bssid, p2p_group_get_interface_addr(wpa_s->p2p_group),
+ ETH_ALEN)) {
+ wpa_printf(MSG_DEBUG, "Discard duplicate RX action event on"
+ " P2P GO interface");
return;
}