diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-07-02 15:16:58 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-07-02 15:16:58 +0000 |
commit | c721369001e8145f2de588732047630d0f56f98d (patch) | |
tree | 4ac385f32b837aad64090e84f6b130b9f9f65878 /sys/net | |
parent | b0ae39c4e75e381d711aea01d99a262ea6ac0903 (diff) |
Move back rdomain's check into ether_output() otherwise it triggers
if a pseudo-interface is on a different rdomain than its parent.
Sorry for the inconvenience, I hope you'll fly again with us.
Regression reported by and ok semarie@, ok phessler@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 10 | ||||
-rw-r--r-- | sys/net/if_ethersubr.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 4828b92c2d4..ce5d5294282 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.348 2015/07/02 09:40:02 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.349 2015/07/02 15:16:57 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -447,14 +447,6 @@ if_enqueue(struct ifnet *ifp, struct mbuf *m) int s, length, error = 0; unsigned short mflags; -#ifdef DIAGNOSTIC - if (ifp->if_rdomain != rtable_l2(m->m_pkthdr.ph_rtableid)) { - printf("%s: trying to send packet on wrong domain. " - "if %d vs. mbuf %d\n", ifp->if_xname, ifp->if_rdomain, - rtable_l2(m->m_pkthdr.ph_rtableid)); - } -#endif - #if NBRIDGE > 0 if (ifp->if_bridgeport && (m->m_flags & M_PROTO1) == 0) return (bridge_output(ifp, m, NULL, NULL)); diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 9a07b6a2d13..fd8ea48ec42 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.214 2015/07/02 09:40:02 mpi Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.215 2015/07/02 15:16:57 mpi Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -176,6 +176,14 @@ ether_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, struct arpcom *ac = (struct arpcom *)ifp; int error = 0; +#ifdef DIAGNOSTIC + if (ifp->if_rdomain != rtable_l2(m->m_pkthdr.ph_rtableid)) { + printf("%s: trying to send packet on wrong domain. " + "if %d vs. mbuf %d\n", ifp->if_xname, + ifp->if_rdomain, rtable_l2(m->m_pkthdr.ph_rtableid)); + } +#endif + esrc = ac->ac_enaddr; if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) |