If a packet is to be reinjected by dummynet onto ethernet input path,
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 23 Aug 2008 08:26:04 +0000 (08:26 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 23 Aug 2008 08:26:04 +0000 (08:26 +0000)
pass 'ifp' to ether_demux_oncpu() then.

sys/net/dummynet/ip_dummynet_glue.c
sys/net/if_ethersubr.c

index c58ace9..ca44147 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/net/dummynet/ip_dummynet_glue.c,v 1.8 2008/08/22 09:14:17 sephe Exp $
+ * $DragonFly: src/sys/net/dummynet/ip_dummynet_glue.c,v 1.9 2008/08/23 08:26:04 sephe Exp $
  */
 
 #include <sys/param.h>
@@ -410,7 +410,7 @@ ip_dn_ether_demux(struct netmsg *nmsg)
                kprintf("%s: pullup fail, dropping pkt\n", __func__);
                goto back;
        }
-       ether_demux_oncpu(NULL, m);
+       ether_demux_oncpu(m->m_pkthdr.rcvif, m);
 back:
        if (unref_priv)
                unref_priv(priv);
index d0e7bcc..a08e550 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)if_ethersubr.c      8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.70.2.33 2003/04/28 15:45:53 archie Exp $
- * $DragonFly: src/sys/net/if_ethersubr.c,v 1.84 2008/08/23 04:12:23 sephe Exp $
+ * $DragonFly: src/sys/net/if_ethersubr.c,v 1.85 2008/08/23 08:26:04 sephe Exp $
  */
 
 #include "opt_atalk.h"
@@ -1033,9 +1033,6 @@ ether_demux_oncpu(struct ifnet *ifp, struct mbuf *m)
                rule = ((struct dn_pkt *)m_tag_data(mtag))->dn_priv;
                KKASSERT(rule != NULL);
 
-               KKASSERT(ifp == NULL);
-               ifp = m->m_pkthdr.rcvif;
-
                m_tag_delete(m, mtag);
                m->m_pkthdr.fw_flags &= ~DUMMYNET_MBUF_TAGGED;