summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_bridge.c8
-rw-r--r--sys/net/if_bridge.h5
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 9e3ed260c65..1038df0c081 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.7 1999/03/19 02:46:54 jason Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.8 1999/03/19 22:47:33 jason Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -280,7 +280,7 @@ bridge_ioctl(ifp, cmd, data)
}
p->ifp = ifs;
- p->bif_flags = IFBIF_LEARNING;
+ p->bif_flags = IFBIF_LEARNING | IFBIF_DISCOVER;
LIST_INSERT_HEAD(&sc->sc_iflist, p, next);
ifs->if_bridge = (caddr_t)sc;
break;
@@ -890,6 +890,10 @@ bridge_broadcast(sc, ifp, eh, m)
if (p->ifp->if_index == ifp->if_index)
continue;
+ if ((p->bif_flags & IFBIF_DISCOVER) == 0 &&
+ (m->m_flags & (M_BCAST|M_MCAST)) == 0)
+ continue;
+
if ((p->ifp->if_flags & IFF_RUNNING) == 0)
continue;
diff --git a/sys/net/if_bridge.h b/sys/net/if_bridge.h
index 6ebcccf5df1..ca4e89e34dc 100644
--- a/sys/net/if_bridge.h
+++ b/sys/net/if_bridge.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.h,v 1.5 1999/03/19 02:46:54 jason Exp $ */
+/* $OpenBSD: if_bridge.h,v 1.6 1999/03/19 22:47:33 jason Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -40,7 +40,8 @@ struct ifbreq {
u_int32_t ifbr_ifsflags; /* memver ifs flags */
};
-#define IFBIF_LEARNING 0x1 /* ifs can learn */
+#define IFBIF_LEARNING 0x1 /* ifs can learn */
+#define IFBIF_DISCOVER 0x2 /* ifs sends packets w/unknown dest */
/*
* Interface list structure