Do not change "rcvif" without goint through if_input() again otherwise
authormpi <mpi@openbsd.org>
Mon, 18 May 2015 11:43:57 +0000 (11:43 +0000)
committermpi <mpi@openbsd.org>
Mon, 18 May 2015 11:43:57 +0000 (11:43 +0000)
the handlers on the new interface won't be executed.

Tested by < mxb AT alumni.chalmers DOT se>

ok dlg@

sys/net/if_bridge.c

index 44aeb85..637dea8 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_bridge.c,v 1.238 2015/05/15 10:15:13 mpi Exp $     */
+/*     $OpenBSD: if_bridge.c,v 1.239 2015/05/18 11:43:57 mpi Exp $     */
 
 /*
  * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1478,12 +1478,9 @@ bridge_dispatch(struct bridge_iflist *ifl, struct ifnet *ifp, struct mbuf *m)
 
                        m->m_pkthdr.rcvif = ifl->ifp;
                        m->m_pkthdr.ph_rtableid = ifl->ifp->if_rdomain;
-                       if (ifp->if_type == IFT_GIF) {
-                               m->m_flags |= M_PROTO1;
-                               ether_input_mbuf(ifl->ifp, m);
-                               m = NULL;
-                       }
-                       return (m);
+                       m->m_flags |= M_PROTO1;
+                       ether_input_mbuf(ifl->ifp, m);
+                       return (NULL);
                }
                if (bcmp(ac->ac_enaddr, eh->ether_shost, ETHER_ADDR_LEN) == 0
 #if NCARP > 0