From 9b40530293047f48e1d91a36cdfea73f066e7cd8 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 28 Apr 2016 20:29:49 +0000 Subject: [PATCH] [net80211] handle action frames in adhoc mode from the node that created the BSS. We don't have a separate bss node; instead we dup the first node we saw and turn that into the BSS node. This means that action frames from that node would be rejected. So, check that the node is the bss node /and/ the MAC doesn't match ni_macaddr. That's the "right" way for now to verify it's an unknown node. This fixes handling action frames in adhoc mode, which includes negotiating 11n aggregation via ADDBA/DELBA. This by itself isn't enough to correctly create 11n adhoc networks; but it is required for aggregation to be negotiated. Tested: * AR9380, 11n adhoc mode * broadcom 11ac adhoc (vendor platform) Sponsored by: Eva Automation, Inc. --- sys/net80211/ieee80211_adhoc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index d3b19373e9c..d7f44003a98 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -854,7 +854,8 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, case IEEE80211_FC0_SUBTYPE_ACTION: case IEEE80211_FC0_SUBTYPE_ACTION_NOACK: - if (ni == vap->iv_bss) { + if ((ni == vap->iv_bss) && + !IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) { IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT, wh, NULL, "%s", "unknown node"); vap->iv_stats.is_rx_mgtdiscard++;