Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/lagg Update the MAC address of all child interface
details: https://anonhg.NetBSD.org/src/rev/14181d6e8e2d
branches: trunk
changeset: 1025162:14181d6e8e2d
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Mon Nov 08 06:17:05 2021 +0000
description:
Update the MAC address of all child interface
when that of lagg is changed.
diffstat:
sys/net/lagg/if_lagg.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 9a4f3711d521 -r 14181d6e8e2d sys/net/lagg/if_lagg.c
--- a/sys/net/lagg/if_lagg.c Sun Nov 07 20:31:09 2021 +0000
+++ b/sys/net/lagg/if_lagg.c Mon Nov 08 06:17:05 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lagg.c,v 1.17 2021/10/22 06:20:47 yamaguchi Exp $ */
+/* $NetBSD: if_lagg.c,v 1.18 2021/11/08 06:17:05 yamaguchi Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk%openbsd.org@localhost>
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.17 2021/10/22 06:20:47 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.18 2021/11/08 06:17:05 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2221,6 +2221,7 @@
lagg_sadl_update(struct lagg_softc *sc, uint8_t *lladdr_prev)
{
struct ifnet *ifp;
+ struct lagg_port *lp;
const uint8_t *lladdr;
ifp = &sc->sc_if;
@@ -2238,6 +2239,12 @@
if_set_sadl(ifp, sc->sc_lladdr, ETHER_ADDR_LEN, false);
+ LAGG_PORTS_FOREACH(sc, lp) {
+ IFNET_LOCK(lp->lp_ifp);
+ lagg_port_setsadl(lp, sc->sc_lladdr, false);
+ IFNET_UNLOCK(lp->lp_ifp);
+ }
+
LAGG_UNLOCK(sc);
lagg_in6_ifdetach(ifp);
lagg_in6_ifattach(ifp);
Home |
Main Index |
Thread Index |
Old Index