Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167716386
D58902.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58902.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D58902: ng_bridge: do not move hosts from learnMac=0 hooks
Attached
Detach File
Event Timeline
Log In to Comment