Move the bridge hook after the loopback check so that IFF_SIMPLEX is honoured

on member interfaces. This makes us the same as OpenBSD/NetBSD.

MFC after:	3 days
This commit is contained in:
Andrew Thompson 2006-08-25 20:16:39 +00:00
parent 4ec528c7a4
commit 3f7d13964e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161626

View File

@ -284,14 +284,6 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
(void)memcpy(eh->ether_shost, IF_LLADDR(ifp),
sizeof(eh->ether_shost));
/*
* Bridges require special output handling.
*/
if (ifp->if_bridge) {
BRIDGE_OUTPUT(ifp, m, error);
return (error);
}
/*
* If a simplex interface, and the packet is being sent to our
* Ethernet address or a broadcast address, loopback a copy.
@ -330,6 +322,14 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
}
}
/*
* Bridges require special output handling.
*/
if (ifp->if_bridge) {
BRIDGE_OUTPUT(ifp, m, error);
return (error);
}
#ifdef DEV_CARP
if (ifp->if_carp &&
(error = carp_output(ifp, m, dst, NULL)))