Remove the hack to check if the received pointer has changed in an ifih
authormpi <mpi@openbsd.org>
Tue, 9 Jun 2015 14:57:30 +0000 (14:57 +0000)
committermpi <mpi@openbsd.org>
Tue, 9 Jun 2015 14:57:30 +0000 (14:57 +0000)
now that all drivers and pseudo-drivers are using if_input().

if_input() is reentrant and is now the only place where we set `rcvif'.

sys/net/if.c

index 9965ae8..2103127 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if.c,v 1.338 2015/06/07 12:02:28 jsg Exp $    */
+/*     $OpenBSD: if.c,v 1.339 2015/06/09 14:57:30 mpi Exp $    */
 /*     $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $  */
 
 /*
@@ -523,7 +523,7 @@ if_input_process(void *xmq)
        s = splnet();
        while ((m = ml_dequeue(&ml)) != NULL) {
                sched_pause();
-again:
+
                /*
                 * Pass this mbuf to all input handlers of its
                 * interface until it is consumed.
@@ -532,10 +532,6 @@ again:
                SLIST_FOREACH(ifih, &ifp->if_inputs, ifih_next) {
                        if ((*ifih->ifih_input)(m))
                                break;
-
-                       /* Pseudo-drivers might be stacked. */
-                       if (ifp != m->m_pkthdr.rcvif)
-                               goto again;
                }
        }
        splx(s);