From owner-svn-src-head@freebsd.org Thu Apr 28 20:29:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53A56B1F506; Thu, 28 Apr 2016 20:29:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 138A41CCB; Thu, 28 Apr 2016 20:29:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3SKTorm070021; Thu, 28 Apr 2016 20:29:50 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3SKToRo070020; Thu, 28 Apr 2016 20:29:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201604282029.u3SKToRo070020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 28 Apr 2016 20:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298756 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2016 20:29:51 -0000 Author: adrian Date: Thu Apr 28 20:29:49 2016 New Revision: 298756 URL: https://svnweb.freebsd.org/changeset/base/298756 Log: [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. Modified: head/sys/net80211/ieee80211_adhoc.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Thu Apr 28 19:26:46 2016 (r298755) +++ head/sys/net80211/ieee80211_adhoc.c Thu Apr 28 20:29:49 2016 (r298756) @@ -854,7 +854,8 @@ adhoc_recv_mgmt(struct ieee80211_node *n 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++;