Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/ifwatchd Don't call UP script when an IP address be...



details:   https://anonhg.NetBSD.org/src/rev/4a92c5bbbac3
branches:  trunk
changeset: 377222:4a92c5bbbac3
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sat Jul 01 12:36:10 2023 +0000

description:
Don't call UP script when an IP address becomes deprecated.

diffstat:

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

diffs (30 lines):

diff -r 1d061abde191 -r 4a92c5bbbac3 usr.sbin/ifwatchd/ifwatchd.c
--- a/usr.sbin/ifwatchd/ifwatchd.c      Sat Jul 01 10:51:35 2023 +0000
+++ b/usr.sbin/ifwatchd/ifwatchd.c      Sat Jul 01 12:36:10 2023 +0000
@@ -1,6 +1,6 @@
-/*     $NetBSD: ifwatchd.c,v 1.46 2020/10/04 20:36:32 roy Exp $        */
+/*     $NetBSD: ifwatchd.c,v 1.47 2023/07/01 12:36:10 mlelstv Exp $    */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: ifwatchd.c,v 1.46 2020/10/04 20:36:32 roy Exp $");
+__RCSID("$NetBSD: ifwatchd.c,v 1.47 2023/07/01 12:36:10 mlelstv Exp $");
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
 #include <unistd.h>
 
 enum event { ARRIVAL, DEPARTURE, UP, DOWN, CARRIER, NO_CARRIER };
-enum addrflag { NOTREADY, DETACHED, READY };
+enum addrflag { NOTREADY, DETACHED, DEPRECATED, READY };
 
 /* local functions */
 __dead static void usage(void);
@@ -303,6 +303,8 @@ check_addrflags(int af, int addrflags)
                        return NOTREADY;
                if (addrflags & IN6_IFF_DETACHED)
                        return DETACHED;
+               if (addrflags & IN6_IFF_DEPRECATED)
+                       return DEPRECATED;
                break;
        }
        return READY;



Home | Main Index | Thread Index | Old Index