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 invoke the up- and down-script for l...



details:   https://anonhg.NetBSD.org/src/rev/5d92406f4b42
branches:  trunk
changeset: 525703:5d92406f4b42
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Apr 15 20:42:37 2002 +0000

description:
Don't invoke the up- and down-script for link local IPv6 addresses.

diffstat:

 usr.sbin/ifwatchd/ifwatchd.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 3ce55698afd4 -r 5d92406f4b42 usr.sbin/ifwatchd/ifwatchd.c
--- a/usr.sbin/ifwatchd/ifwatchd.c      Mon Apr 15 18:08:22 2002 +0000
+++ b/usr.sbin/ifwatchd/ifwatchd.c      Mon Apr 15 20:42:37 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ifwatchd.c,v 1.7 2002/04/15 17:32:18 tron Exp $        */
+/*     $NetBSD: ifwatchd.c,v 1.8 2002/04/15 20:42:37 tron Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -252,7 +252,7 @@
            }
        }
        if (ifa != NULL)
-          invoke_script(ifa, brd, is_up, ifndx);
+           invoke_script(ifa, brd, is_up, ifndx);
 }
 
 static void
@@ -264,6 +264,14 @@
             *ifname, *cmd;
        const char *script;
 
+       if (sa->sa_family == AF_INET6) {
+               struct sockaddr_in6 sin6;
+
+               (void) memcpy(&sin6, (struct sockaddr_in6 *)sa, sizeof (sin6));
+               if (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr))
+                       return;
+       }
+
        daddr[0] = 0;
        ifname = if_indextoname(ifindex, ifname_buf);
        if (sa->sa_len == 0) {



Home | Main Index | Thread Index | Old Index