Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/lagg lagg: fix an uninitialize variable
details: https://anonhg.NetBSD.org/src/rev/feb05f94ffa2
branches: trunk
changeset: 984274:feb05f94ffa2
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Wed Jun 30 06:39:47 2021 +0000
description:
lagg: fix an uninitialize variable
pointed out by tnn@n.o., thanks.
diffstat:
sys/net/lagg/if_lagg_lacp.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 0a50cd8e48ca -r feb05f94ffa2 sys/net/lagg/if_lagg_lacp.c
--- a/sys/net/lagg/if_lagg_lacp.c Wed Jun 30 06:24:02 2021 +0000
+++ b/sys/net/lagg/if_lagg_lacp.c Wed Jun 30 06:39:47 2021 +0000
@@ -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 @@
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);
}
Home |
Main Index |
Thread Index |
Old Index