Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/ifwatchd Inhibit initial up should only apply at pr...



details:   https://anonhg.NetBSD.org/src/rev/a53f75a9912a
branches:  trunk
changeset: 348160:a53f75a9912a
user:      roy <roy%NetBSD.org@localhost>
date:      Thu Oct 06 11:13:57 2016 +0000

description:
Inhibit initial up should only apply at program start, not for hot plugged interfaces while it's running.

diffstat:

 usr.sbin/ifwatchd/ifwatchd.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 7b220ef48b9f -r a53f75a9912a usr.sbin/ifwatchd/ifwatchd.c
--- a/usr.sbin/ifwatchd/ifwatchd.c      Thu Oct 06 11:08:55 2016 +0000
+++ b/usr.sbin/ifwatchd/ifwatchd.c      Thu Oct 06 11:13:57 2016 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: ifwatchd.c,v 1.39 2016/10/06 11:08:55 roy Exp $        */
+/*     $NetBSD: ifwatchd.c,v 1.40 2016/10/06 11:13:57 roy Exp $        */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: ifwatchd.c,v 1.39 2016/10/06 11:08:55 roy Exp $");
+__RCSID("$NetBSD: ifwatchd.c,v 1.40 2016/10/06 11:13:57 roy Exp $");
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -470,8 +470,7 @@
         * inhibit_initial is not set
         */
        carrier_status = ifm->ifm_data.ifi_link_state;
-       if ((carrier_status != p->last_carrier_status) ||
-           ((p->last_carrier_status == -1) && !inhibit_initial)) {
+       if (carrier_status != p->last_carrier_status) {
                switch (carrier_status) {
                case LINK_STATE_UP:
                        ev = CARRIER;
@@ -506,7 +505,7 @@
                        break;
                case IFAN_DEPARTURE:
                        p->index = -1;
-                       p->last_carrier_status = LINK_STATE_UNKNOWN;
+                       p->last_carrier_status = -1;
                        invoke_script(p->ifname, DEPARTURE, NULL, NULL);
                        break;
                default:



Home | Main Index | Thread Index | Old Index