git: 0b420c655f81 - main - lacp: fix lacp for interfaces with unknown media
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Nov 2026 15:58:38 UTC
The branch main has been updated by gallatin:
URL: https://cgit.FreeBSD.org/src/commit/?id=0b420c655f816a31165c457b9462183b25eaecf2
commit 0b420c655f816a31165c457b9462183b25eaecf2
Author: Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2026-11-02 15:53:34 +0000
Commit: Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2026-11-02 15:58:28 +0000
lacp: fix lacp for interfaces with unknown media
Fall back to if_baudrate if ifmedia_baudrate() returns 0 in
lacp_aggregator_bandwidth().
When lacp_aggregator_bandwidth() returns 0, lacp will
never come up, due to aggregator selection starting with a 0.
This is why its important for interfaces with unknown media
(meaning ifmedia_baudrate() returns 0) to fall back to
using if_baudrate in order to avoid this state.
Differential Revision: https://reviews.freebsd.org/D61084
Reviewed by: kbowling
Sponsored by: Netflix
---
sys/net/ieee8023ad_lacp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c
index 7861dfe455ca..92f45a3c74c4 100644
--- a/sys/net/ieee8023ad_lacp.c
+++ b/sys/net/ieee8023ad_lacp.c
@@ -960,6 +960,8 @@ lacp_aggregator_bandwidth(struct lacp_aggregator *la)
}
speed = ifmedia_baudrate(lp->lp_media);
+ if (speed == 0)
+ speed = lp->lp_ifp->if_baudrate;
speed *= la->la_nports;
if (speed == 0) {
LACP_DPRINTF((lp, "speed 0? media=0x%x nports=%d\n",