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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to