Source-Changes-HG archive

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

[src/trunk]: src/sys When initializing addresses, reset the interface flags t...



details:   https://anonhg.NetBSD.org/src/rev/70fd24c120c8
branches:  trunk
changeset: 347730:70fd24c120c8
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 13 15:41:33 2016 +0000

description:
When initializing addresses, reset the interface flags to 0. This fixes
an issue where point to point addresses that started down, and then came
up, were left with stale flags on one side of the point to point link.

diffstat:

 sys/netinet/in.c   |  5 +++--
 sys/netinet6/in6.c |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r 3dd3aea19879 -r 70fd24c120c8 sys/netinet/in.c
--- a/sys/netinet/in.c  Tue Sep 13 07:41:18 2016 +0000
+++ b/sys/netinet/in.c  Tue Sep 13 15:41:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.c,v 1.179 2016/09/01 04:27:00 ozaki-r Exp $ */
+/*     $NetBSD: in.c,v 1.180 2016/09/13 15:41:33 christos Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.179 2016/09/01 04:27:00 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.180 2016/09/13 15:41:33 christos Exp $");
 
 #include "arp.h"
 
@@ -1065,6 +1065,7 @@
         */
        oldaddr = ia->ia_addr;
        ia->ia_addr = *sin;
+       ia->ia4_flags = 0;
 
        /* Set IN_IFF flags early for if_addr_init() */
        if (hostIsNew && if_do_dad(ifp) && !in_nullhost(ia->ia_addr.sin_addr)) {
diff -r 3dd3aea19879 -r 70fd24c120c8 sys/netinet6/in6.c
--- a/sys/netinet6/in6.c        Tue Sep 13 07:41:18 2016 +0000
+++ b/sys/netinet6/in6.c        Tue Sep 13 15:41:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6.c,v 1.218 2016/09/02 15:57:54 roy Exp $    */
+/*     $NetBSD: in6.c,v 1.219 2016/09/13 15:41:34 christos Exp $       */
 /*     $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $   */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.218 2016/09/02 15:57:54 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.219 2016/09/13 15:41:34 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1708,6 +1708,7 @@
        }
 
        ia->ia_addr = *sin6;
+       ia->ia6_flags = 0;
 
        if (ifacount <= 0 &&
            (error = if_addr_init(ifp, &ia->ia_ifa, true)) != 0) {



Home | Main Index | Thread Index | Old Index