Module Name: src Committed By: yamaguchi Date: Wed Jun 30 06:39:47 UTC 2021
Modified Files: src/sys/net/lagg: if_lagg_lacp.c Log Message: lagg: fix an uninitialize variable pointed out by tnn@n.o., thanks. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/net/lagg/if_lagg_lacp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/lagg/if_lagg_lacp.c diff -u src/sys/net/lagg/if_lagg_lacp.c:1.2 src/sys/net/lagg/if_lagg_lacp.c:1.3 --- src/sys/net/lagg/if_lagg_lacp.c:1.2 Tue May 18 11:02:58 2021 +++ src/sys/net/lagg/if_lagg_lacp.c Wed Jun 30 06:39:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_lagg_lacp.c,v 1.2 2021/05/18 11:02:58 hannken Exp $ */ +/* $NetBSD: if_lagg_lacp.c,v 1.3 2021/06/30 06:39:47 yamaguchi Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.2 2021/05/18 11:02:58 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_lagg_lacp.c,v 1.3 2021/06/30 06:39:47 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_lagg.h" @@ -2368,13 +2368,17 @@ lacp_unselect(struct lacp_softc *lsc, st lacpp->lp_aggregator = NULL; if (LIST_EMPTY(&la->la_ports)) { + remove_actaggr = false; + if (la == lsc->lsc_aggregator) { LACP_DPRINTF((lsc, NULL, "remove active aggregator\n")); lsc->lsc_aggregator = NULL; remove_actaggr = true; } + TAILQ_REMOVE(&lsc->lsc_aggregators, la, la_q); kmem_free(la, sizeof(*la)); + if (remove_actaggr) { lacp_select_active_aggregator(lsc); }