summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2001-11-04 22:56:25 +0000
committerluigi <luigi@FreeBSD.org>2001-11-04 22:56:25 +0000
commitf565e0a1dff9f306dcf2a7ce69991a22170dfa34 (patch)
treec941161cecb4fb744bf3988da945ddfd0a75a240 /sys/net/if_ethersubr.c
parent473a686e79edeaa4c5a1b0e1fced3d7dcc9ef444 (diff)
downloadFreeBSD-src-f565e0a1dff9f306dcf2a7ce69991a22170dfa34.zip
FreeBSD-src-f565e0a1dff9f306dcf2a7ce69991a22170dfa34.tar.gz
MFS: sync the ipfw/dummynet/bridge code with the one recently merged
into stable (mostly , but not only, formatting and comments changes).
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index fe2cb63..4f445d2 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -364,7 +364,7 @@ ether_output_frame(ifp, m)
{
int error = 0;
- if (do_bridge && bdg_forward_ptr != NULL && BDG_USED(ifp) ) {
+ if (BDG_ACTIVE(ifp) ) {
struct ether_header *eh; /* a ptr suffices */
m->m_pkthdr.rcvif = NULL;
@@ -429,7 +429,7 @@ ether_input(ifp, eh, m)
}
/* Check for bridging mode */
- if (do_bridge && bdg_forward_ptr != NULL && BDG_USED(ifp) ) {
+ if (BDG_ACTIVE(ifp) ) {
struct ifnet *bif;
/* Check with bridging code */
@@ -441,7 +441,7 @@ ether_input(ifp, eh, m)
struct mbuf *oldm = m ;
save_eh = *eh ; /* because it might change */
- m = bdg_forward_ptr(m, eh, bif); /* needs forwarding */
+ m = bdg_forward_ptr(m, eh, bif); /* needs forwarding */
/*
* Do not continue if bdg_forward_ptr() processed our
* packet (and cleared the mbuf pointer m) or if
@@ -462,7 +462,7 @@ ether_input(ifp, eh, m)
/* If not local and not multicast, just drop it */
if (m != NULL)
- m_freem(m);
+ m_freem(m);
return;
}
@@ -488,7 +488,7 @@ ether_demux(ifp, eh, m)
#if defined(NETATALK)
register struct llc *l;
#endif
-
+ if (! (BDG_ACTIVE(ifp) ) )
/* Discard packet if upper layers shouldn't see it because it was
unicast to a different Ethernet address. If the driver is working
properly, then this situation can only happen when the interface
@@ -674,7 +674,7 @@ ether_ifattach(ifp, bpf)
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
if (ng_ether_attach_p != NULL)
(*ng_ether_attach_p)(ifp);
- if (bdgtakeifaces_ptr != NULL)
+ if (BDG_LOADED)
bdgtakeifaces_ptr();
}
@@ -691,7 +691,7 @@ ether_ifdetach(ifp, bpf)
if (bpf)
bpfdetach(ifp);
if_detach(ifp);
- if (bdgtakeifaces_ptr != NULL)
+ if (BDG_LOADED)
bdgtakeifaces_ptr();
}
OpenPOWER on IntegriCloud