path: root/sys/netgraph/ng_bridge.h
diff options
authorLutz Donnerhacke <donner@FreeBSD.org>2021-02-06 10:08:24 +0000
committerLutz Donnerhacke <donner@FreeBSD.org>2021-02-06 10:09:26 +0000
commitf961caf2184c94d6f59c8d522207156b3533d977 (patch)
tree3482f22256f85361f139150b662ca9118deb122c /sys/netgraph/ng_bridge.h
parent344f1083e128d8d41ca31853dac513ca3efd9d1f (diff)
netgraph/ng_bridge: Introduce "uplink" ports without MAC learning
The ng_bridge(4) node is designed to work in moderately small environments. Connecting such a node to a larger network rapidly fills the MAC table for no reason. It even become complicated to obtain data from the gettable message, because the result is too large to transmit. This patch introduces, two new functionality bits on the hooks: - Allow or disallow MAC address learning for incoming patckets. - Allow or disallow sending unknown MACs through this hook. Uplinks are characterized by denied learing while sending out unknowns. Normal links are charaterized by allowed learning and sending out unknowns. Reviewed by: kp Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23963
Diffstat (limited to 'sys/netgraph/ng_bridge.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_bridge.h b/sys/netgraph/ng_bridge.h
index e4b74efbfc5e..2aecf7f9f9cb 100644
--- a/sys/netgraph/ng_bridge.h
+++ b/sys/netgraph/ng_bridge.h
@@ -64,6 +64,8 @@
/* Hook names */
#define NG_BRIDGE_HOOK_LINK_PREFIX "link" /* append decimal integer */
#define NG_BRIDGE_HOOK_LINK_FMT "link%d" /* for use with printf(3) */
+#define NG_BRIDGE_HOOK_UPLINK_PREFIX "uplink" /* append decimal integer */
+#define NG_BRIDGE_HOOK_UPLINK_FMT "uplink%d" /* for use with printf(3) */
/* Node configuration structure */
struct ng_bridge_config {