summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-10-13 09:43:30 +0000
committerthompsa <thompsa@FreeBSD.org>2005-10-13 09:43:30 +0000
commite085cf5c30f71fc8321aa4c804d45119bcda1fad (patch)
tree6e2d31668170780f98cc29be1a0e90f85f72b79f /sys/netgraph
parent8fe74b285e545ff5d761214a40bf9ec18221b427 (diff)
downloadFreeBSD-src-e085cf5c30f71fc8321aa4c804d45119bcda1fad.zip
FreeBSD-src-e085cf5c30f71fc8321aa4c804d45119bcda1fad.tar.gz
Clean up the if_bridge hooks a bit in if_ethersubr.c and ng_ether.c, move
the broadcast/multicast test to bridge_input(). Requested by: glebius
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_ether.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index 29a8348..c493092 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -105,8 +105,6 @@ static int ng_ether_rcv_upper(node_p node, struct mbuf *m);
/* if_bridge(4) support. XXX: should go into some include. */
extern struct mbuf *(*bridge_input_p)(struct ifnet *, struct mbuf *);
-static const u_char etherbroadcastaddr[ETHER_ADDR_LEN] =
- { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
/* Netgraph node methods */
static ng_constructor_t ng_ether_constructor;
@@ -653,26 +651,9 @@ ng_ether_rcv_upper(node_p node, struct mbuf *m)
* XXX: This is a copy'and'paste from if_ethersubr.c:ether_input()
*/
if (ifp->if_bridge) {
- struct ether_header *eh;
-
KASSERT(bridge_input_p != NULL,
("%s: if_bridge not loaded!", __func__));
- eh = mtod(m, struct ether_header *);
-
- /* Mark the packet as broadcast or multicast. This is also set
- * further down the code in ether_demux() but since the bridge
- * input routine rarely returns a mbuf for further processing,
- * it is an acceptable duplication.
- */
- if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
- if (bcmp(etherbroadcastaddr, eh->ether_dhost,
- sizeof(etherbroadcastaddr)) == 0)
- m->m_flags |= M_BCAST;
- else
- m->m_flags |= M_MCAST;
- }
-
m = (*bridge_input_p)(ifp, m);
if (m == NULL)
return (0);
OpenPOWER on IntegriCloud