Module Name: src Committed By: ozaki-r Date: Thu Nov 29 09:54:23 UTC 2018
Modified Files: src/sys/netinet: in.c src/sys/netinet6: in6.c Log Message: Don't run DAD on link-up if it's explicitly disabled To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/sys/netinet/in.c cvs rdiff -u -r1.271 -r1.272 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/in.c diff -u src/sys/netinet/in.c:1.232 src/sys/netinet/in.c:1.233 --- src/sys/netinet/in.c:1.232 Thu Nov 29 09:51:20 2018 +++ src/sys/netinet/in.c Thu Nov 29 09:54:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.232 2018/11/29 09:51:20 ozaki-r Exp $ */ +/* $NetBSD: in.c,v 1.233 2018/11/29 09:54:22 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.232 2018/11/29 09:51:20 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.233 2018/11/29 09:54:22 ozaki-r Exp $"); #include "arp.h" @@ -1470,7 +1470,8 @@ in_if_link_up(struct ifnet *ifp) /* If detached then mark as tentative */ if (ia->ia4_flags & IN_IFF_DETACHED) { ia->ia4_flags &= ~IN_IFF_DETACHED; - if (if_do_dad(ifp) && ia->ia_dad_start != NULL) + if (ip_dad_enabled() && if_do_dad(ifp) && + ia->ia_dad_start != NULL) ia->ia4_flags |= IN_IFF_TENTATIVE; else if ((ia->ia4_flags & IN_IFF_TENTATIVE) == 0) rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL); Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.271 src/sys/netinet6/in6.c:1.272 --- src/sys/netinet6/in6.c:1.271 Thu Nov 29 09:51:21 2018 +++ src/sys/netinet6/in6.c Thu Nov 29 09:54:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.271 2018/11/29 09:51:21 ozaki-r Exp $ */ +/* $NetBSD: in6.c,v 1.272 2018/11/29 09:54:23 ozaki-r 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.271 2018/11/29 09:51:21 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.272 2018/11/29 09:54:23 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2204,7 +2204,7 @@ in6_if_link_up(struct ifnet *ifp) /* If detached then mark as tentative */ if (ia->ia6_flags & IN6_IFF_DETACHED) { ia->ia6_flags &= ~IN6_IFF_DETACHED; - if (if_do_dad(ifp)) { + if (ip6_dad_enabled() && if_do_dad(ifp)) { ia->ia6_flags |= IN6_IFF_TENTATIVE; nd6log(LOG_ERR, "%s marked tentative\n", IN6_PRINT(ip6buf,