Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Don't run DAD on link-up if it's explicitly disabled
details: https://anonhg.NetBSD.org/src/rev/a0446c052906
branches: trunk
changeset: 994946:a0446c052906
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Nov 29 09:54:22 2018 +0000
description:
Don't run DAD on link-up if it's explicitly disabled
diffstat:
sys/netinet/in.c | 7 ++++---
sys/netinet6/in6.c | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r a12294151fee -r a0446c052906 sys/netinet/in.c
--- a/sys/netinet/in.c Thu Nov 29 09:51:20 2018 +0000
+++ b/sys/netinet/in.c Thu Nov 29 09:54:22 2018 +0000
@@ -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 @@
/* 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);
diff -r a12294151fee -r a0446c052906 sys/netinet6/in6.c
--- a/sys/netinet6/in6.c Thu Nov 29 09:51:20 2018 +0000
+++ b/sys/netinet6/in6.c Thu Nov 29 09:54:22 2018 +0000
@@ -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 @@
/* 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,
Home |
Main Index |
Thread Index |
Old Index