diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 569b5c529b3a..4e7f4b133459 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -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 -__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 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, */ 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 --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 21f364e9df6a..e7fbea6976d1 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -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 -__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 @@ in6_ifinit(struct ifnet *ifp, struct in6_ifaddr *ia, } ia->ia_addr = *sin6; + ia->ia6_flags = 0; if (ifacount <= 0 && (error = if_addr_init(ifp, &ia->ia_ifa, true)) != 0) {