Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net ifmedia_removeall(): Clear ifm_cur and ifm_media aft...



details:   https://anonhg.NetBSD.org/src/rev/3676b7db1150
branches:  trunk
changeset: 821118:3676b7db1150
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Jan 25 07:19:24 2017 +0000

description:
ifmedia_removeall(): Clear ifm_cur and ifm_media after removing all ifmedia
entries.

diffstat:

 sys/net/if_media.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 1aa36329ce38 -r 3676b7db1150 sys/net/if_media.c
--- a/sys/net/if_media.c        Wed Jan 25 07:17:19 2017 +0000
+++ b/sys/net/if_media.c        Wed Jan 25 07:19:24 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_media.c,v 1.31 2017/01/25 07:17:19 msaitoh Exp $    */
+/*     $NetBSD: if_media.c,v 1.32 2017/01/25 07:19:24 msaitoh Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.31 2017/01/25 07:17:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.32 2017/01/25 07:19:24 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -419,6 +419,8 @@
                TAILQ_REMOVE(&ifm->ifm_list, ife, ifm_list);
                free(ife, M_IFMEDIA);
        }
+       ifm->ifm_cur = NULL;
+       ifm->ifm_media = IFM_NONE;
 }
 
 



Home | Main Index | Thread Index | Old Index