Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2008 20:09:51 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 140635 for review
Message-ID:  <200804252009.m3PK9pr5087405@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=140635

Change 140635 by sam@sam_ebb on 2008/04/25 20:09:46

	IFC @ 140634

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211.c#40 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211.c#40 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.46 2008/04/20 20:35:43 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.47 2008/04/25 19:45:42 sam Exp $");
 
 /*
  * IEEE 802.11 generic handler
@@ -181,6 +181,22 @@
 	if_printf(ifp, "need promiscuous mode update callback\n");
 }
 
+static int
+null_output(struct ifnet *ifp, struct mbuf *m,
+	struct sockaddr *dst, struct rtentry *rt0)
+{
+	if_printf(ifp, "discard raw packet\n");
+	m_freem(m);
+	return EIO;
+}
+
+static void
+null_input(struct ifnet *ifp, struct mbuf *m)
+{
+	if_printf(ifp, "if_input should not be called\n");
+	m_freem(m);
+}
+
 /*
  * Attach/setup the common net80211 state.  Called by
  * the driver on attach to prior to creating any vap's.
@@ -225,6 +241,9 @@
 	if_attach(ifp);
 	ifp->if_mtu = IEEE80211_MTU_MAX;
 	ifp->if_broadcastaddr = ieee80211broadcastaddr;
+	ifp->if_output = null_output;
+	ifp->if_input = null_input;	/* just in case */
+	ifp->if_resolvemulti = NULL;	/* NB: callers check */
 
 	ifa = ifaddr_byindex(ifp->if_index);
 	KASSERT(ifa != NULL, ("%s: no lladdr!\n", __func__));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804252009.m3PK9pr5087405>