Page MenuHomeFreeBSD

D58902.diff
No OneTemporary

D58902.diff

diff --git a/share/man/man4/ng_bridge.4 b/share/man/man4/ng_bridge.4
--- a/share/man/man4/ng_bridge.4
+++ b/share/man/man4/ng_bridge.4
@@ -32,7 +32,7 @@
.\"
.\" Author: Archie Cobbs <archie@FreeBSD.org>
.\"
-.Dd April 8, 2024
+.Dd August 17, 2026
.Dt NG_BRIDGE 4
.Os
.Sh NAME
@@ -97,6 +97,12 @@
.Ar uplinkX .
The node does not learn MAC addresses on uplink hooks, which keeps
the internal address table small.
+A host already known on a
+.Ar linkX
+hook is not moved when a packet with that source address
+arrives on an uplink hook; use
+.Dv NGM_BRIDGE_MOVE_HOST
+to place a host on an uplink hook explicitly.
This way it is desirable to connect the
.Ar lower
hook of an
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -858,8 +858,13 @@
if (__predict_false(host->staleness > 0))
host->staleness = 0;
- if ((host == NULL && ctx.incoming->learnMac) ||
- (host != NULL && host->link != ctx.incoming)) {
+ /*
+ * Uplink sets learnMac=0 so we neither learn a new MAC nor
+ * move an existing one from packets received there. Insert
+ * already required learnMac; move did not.
+ */
+ if (ctx.incoming->learnMac &&
+ (host == NULL || host->link != ctx.incoming)) {
struct ng_mesg *msg;
struct ng_bridge_move_host *mh;
int error = 0;

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 24, 11:18 PM (16 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37187033
Default Alt Text
D58902.diff (1 KB)

Event Timeline