Don't run DAD on link-up if it's explicitly disabled
This commit is contained in:
parent
42cd9a0569
commit
2050bad43a
|
@ -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.
|
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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"
|
#include "arp.h"
|
||||||
|
|
||||||
|
@ -1470,7 +1470,8 @@ in_if_link_up(struct ifnet *ifp)
|
||||||
/* If detached then mark as tentative */
|
/* If detached then mark as tentative */
|
||||||
if (ia->ia4_flags & IN_IFF_DETACHED) {
|
if (ia->ia4_flags & IN_IFF_DETACHED) {
|
||||||
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;
|
ia->ia4_flags |= IN_IFF_TENTATIVE;
|
||||||
else if ((ia->ia4_flags & IN_IFF_TENTATIVE) == 0)
|
else if ((ia->ia4_flags & IN_IFF_TENTATIVE) == 0)
|
||||||
rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL);
|
rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL);
|
||||||
|
|
|
@ -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 $ */
|
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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
|
#ifdef _KERNEL_OPT
|
||||||
#include "opt_inet.h"
|
#include "opt_inet.h"
|
||||||
|
@ -2204,7 +2204,7 @@ in6_if_link_up(struct ifnet *ifp)
|
||||||
/* If detached then mark as tentative */
|
/* If detached then mark as tentative */
|
||||||
if (ia->ia6_flags & IN6_IFF_DETACHED) {
|
if (ia->ia6_flags & IN6_IFF_DETACHED) {
|
||||||
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;
|
ia->ia6_flags |= IN6_IFF_TENTATIVE;
|
||||||
nd6log(LOG_ERR, "%s marked tentative\n",
|
nd6log(LOG_ERR, "%s marked tentative\n",
|
||||||
IN6_PRINT(ip6buf,
|
IN6_PRINT(ip6buf,
|
||||||
|
|
Loading…
Reference in New Issue