Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Revert the previous two commits as per roy@'s re...



details:   https://anonhg.NetBSD.org/src/rev/8e3dc7e80537
branches:  trunk
changeset: 321802:8e3dc7e80537
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Apr 06 16:01:16 2018 +0000

description:
Revert the previous two commits as per roy@'s request

It broke the ip_dad_count > 0 case unexpectedly.

diffstat:

 sys/netinet/in.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (41 lines):

diff -r 8a4a35701d5e -r 8e3dc7e80537 sys/netinet/in.c
--- a/sys/netinet/in.c  Fri Apr 06 15:47:08 2018 +0000
+++ b/sys/netinet/in.c  Fri Apr 06 16:01:16 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.c,v 1.225 2018/04/06 09:20:29 ozaki-r Exp $ */
+/*     $NetBSD: in.c,v 1.226 2018/04/06 16:01:16 ozaki-r 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.225 2018/04/06 09:20:29 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.226 2018/04/06 16:01:16 ozaki-r Exp $");
 
 #include "arp.h"
 
@@ -1143,15 +1143,15 @@
         * We need to do this early because they maybe adjusted
         * by if_addr_init depending on the address.
         */
-       if (ia->ia4_flags & IN_IFF_DUPLICATED)
+       if (ia->ia4_flags & IN_IFF_DUPLICATED) {
+               ia->ia4_flags &= ~IN_IFF_DUPLICATED;
                hostIsNew = 1;
-       ia->ia4_flags = 0;
-       if (ip_dad_count > 0) {
-               if (ifp->if_link_state == LINK_STATE_DOWN)
-                       ia->ia4_flags |= IN_IFF_DETACHED;
-               else if (hostIsNew && if_do_dad(ifp))
-                       ia->ia4_flags |= IN_IFF_TRYTENTATIVE;
        }
+       if (ifp->if_link_state == LINK_STATE_DOWN) {
+               ia->ia4_flags |= IN_IFF_DETACHED;
+               ia->ia4_flags &= ~IN_IFF_TENTATIVE;
+       } else if (hostIsNew && if_do_dad(ifp))
+               ia->ia4_flags |= IN_IFF_TRYTENTATIVE;
 
        /*
         * Give the interface a chance to initialize



Home | Main Index | Thread Index | Old Index