Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net vlan: set the link state to DOWN when its parent det...
details: https://anonhg.NetBSD.org/src/rev/b13a28946cda
branches: trunk
changeset: 984384:b13a28946cda
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Tue Jul 06 01:16:01 2021 +0000
description:
vlan: set the link state to DOWN when its parent detaches
diffstat:
sys/net/if_vlan.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 9d435fab7783 -r b13a28946cda sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Mon Jul 05 21:43:56 2021 +0000
+++ b/sys/net/if_vlan.c Tue Jul 06 01:16:01 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vlan.c,v 1.154 2021/06/16 00:21:19 riastradh Exp $ */
+/* $NetBSD: if_vlan.c,v 1.155 2021/07/06 01:16:01 yamaguchi Exp $ */
/*
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.154 2021/06/16 00:21:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.155 2021/07/06 01:16:01 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -366,6 +366,7 @@
* Set the link state to down.
* When the parent interface attaches we will use that link state.
* When the parent interface link state changes, so will ours.
+ * When the parent interface detaches, set the link state to down.
*/
ifp->if_link_state = LINK_STATE_DOWN;
@@ -685,6 +686,7 @@
PSLIST_ENTRY_DESTROY(ifv, ifv_hash);
vlan_linkmib_update(ifv, nmib);
+ if_link_state_change(ifp, LINK_STATE_DOWN);
mutex_exit(&ifv->ifv_lock);
Home |
Main Index |
Thread Index |
Old Index