diff options
author | luigi <luigi@FreeBSD.org> | 1998-12-14 17:58:05 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 1998-12-14 17:58:05 +0000 |
commit | 78f32fa7e071a1e01b906f438ffe7454438b1730 (patch) | |
tree | c3586f268e4d14b08735ae8410f8c9fc1e83f7df /sys/net/if_ethersubr.c | |
parent | 9c55aebaa438b30ec51f87c8753651909f0b2800 (diff) | |
download | FreeBSD-src-78f32fa7e071a1e01b906f438ffe7454438b1730.zip FreeBSD-src-78f32fa7e071a1e01b906f438ffe7454438b1730.tar.gz |
Bridging support. Wait for LINT to be updated before trying it.
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index ca66eb0..eab4795 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -31,12 +31,13 @@ * SUCH DAMAGE. * * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 - * $Id: if_ethersubr.c,v 1.51 1998/06/14 20:58:14 julian Exp $ + * $Id: if_ethersubr.c,v 1.52 1998/08/04 23:17:05 julian Exp $ */ #include "opt_atalk.h" #include "opt_inet.h" #include "opt_ipx.h" +#include "opt_bdg.h" #include <sys/param.h> #include <sys/systm.h> @@ -101,6 +102,10 @@ extern u_char at_org_code[3]; extern u_char aarp_org_code[3]; #endif /* NETATALK */ +#ifdef BRIDGE +#include <net/bridge.h> +#endif + #include "vlan.h" #if NVLAN > 0 #include <net/if_vlan_var.h> @@ -372,7 +377,19 @@ ether_output(ifp, m0, dst, rt0) return(0); /* XXX */ } } - +#ifdef BRIDGE + if (do_bridge) { + struct ifnet *old_ifp = ifp ; + struct mbuf *m0 = m ; + if (m->m_pkthdr.rcvif ) + m->m_pkthdr.rcvif = NULL ; + ifp = bridge_dst_lookup(m); + bdg_forward(&m0, ifp); + if (m0) + m_freem(m0); + return 0 ; + } +#endif s = splimp(); /* * Queue message on interface, and start output if interface |