aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-11-13 03:00:21 +0200
committerEyal Shapira <eyal@wizery.com>2012-11-13 14:45:35 +0200
commit4e1835b2ccb4698e8e7022522928317d219bca32 (patch)
tree1b6e153f3d24f6f31ee8d6b7c50f0d882ac2cb63 /wpa_supplicant
parentf63238165abfda18b46bbc8c2a0e91aca853da64 (diff)
downloadexternal_wpa_supplicant_8_ti-4e1835b2ccb4698e8e7022522928317d219bca32.zip
external_wpa_supplicant_8_ti-4e1835b2ccb4698e8e7022522928317d219bca32.tar.gz
external_wpa_supplicant_8_ti-4e1835b2ccb4698e8e7022522928317d219bca32.tar.bz2
P2P: Fix broken rx action frame handling (INTERNAL-SQUASH)
Commit "P2P: Fix duplicate handling of rx action frames" went too far and dropped any rx action frames arriving on the GO interface. It assumed that any action frames were duplicated and received on both GO interface and P2P device interface. This is wrong as some actions frames like P2P presence request are sent to the GO interface address and won't be duplicated. The root cause of the duplication lies within the Rx path in mac80211 in Johannes` patch "mac80211: accept public action frames with mismatched BSSID". When wpa_s works with a separate group interface this creates a duplicated Rx on both the P2P dev interface and the GO interface. Fix the issue by canceling the duplication in wpa_s and discarding public action frames with unmatching bssid arriving on a dedicated GO interface (This should be squashed with "P2P: Fix duplicate handling of rx action frames") Signed-off-by: Eyal Shapira <eyal@wizery.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c16
1 files changed, 13 insertions, 3 deletions
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;
}