From owner-svn-src-all@FreeBSD.ORG Sun Aug 10 08:35:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A611DC0 for ; Sun, 10 Aug 2014 08:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CECD727E2 for ; Sun, 10 Aug 2014 08:35:42 +0000 (UTC) Received: from adrian (uid 753) (envelope-from adrian@FreeBSD.org) id 2247 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 08:35:42 +0000 From: Adrian Chadd Date: Sun, 10 Aug 2014 08:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269778 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e72ede.2247.6354488c@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 08:35:43 -0000 Author: adrian Date: Sun Aug 10 08:35:42 2014 New Revision: 269778 URL: http://svnweb.freebsd.org/changeset/base/269778 Log: Undo r195846 for now - allow raw frame transmit in monitor mode. The original commit was supposed to stop the ability to do raw frame injection in monitor mode to arbitrary channels (whether supported by regulatory or not) however it doesn't seem to have been followed by any useful way of doing it. Apparently AHDEMO is supposed to be that way, but it seems to require too much fiddly things (disable scanning, set a garbage SSID, etc) for it to actually be useful for spoofing things. So for now let's just disable it and instead look to filter transmit in the output path if the channel isn't allowed by regulatory. That way monitor RX works fine but TX will be blocked. I don't plan on MFC'ing this to -10 until the regulatory enforcement bits are written. Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Sun Aug 10 07:51:55 2014 (r269777) +++ head/sys/net80211/ieee80211.c Sun Aug 10 08:35:42 2014 (r269778) @@ -570,15 +570,9 @@ ieee80211_vap_attach(struct ieee80211vap ifp->if_baudrate = IF_Mbps(maxrate); ether_ifattach(ifp, vap->iv_myaddr); - if (vap->iv_opmode == IEEE80211_M_MONITOR) { - /* NB: disallow transmit */ - ifp->if_transmit = null_transmit; - ifp->if_output = null_output; - } else { - /* hook output method setup by ether_ifattach */ - vap->iv_output = ifp->if_output; - ifp->if_output = ieee80211_output; - } + /* hook output method setup by ether_ifattach */ + vap->iv_output = ifp->if_output; + ifp->if_output = ieee80211_output; /* NB: if_mtu set by ether_ifattach to ETHERMTU */ IEEE80211_LOCK(ic);