summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorozaki-r <ozaki-r@NetBSD.org>2018-04-06 09:19:16 +0000
committerozaki-r <ozaki-r@NetBSD.org>2018-04-06 09:19:16 +0000
commit85dfd987405d860487cf35f0d1a00bbbd50aac24 (patch)
tree0c99d8b3d6d54321ccf56bb49787d1440d46bfe3 /sys/netinet
parent7d5af9b544263fa62c8c3ac013065aa824b87af4 (diff)
Simplify; clear then set flags to ia4_flags (NFCI)
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index b2753865062..d246988cda3 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.223 2018/03/06 07:27:55 ozaki-r Exp $ */
+/* $NetBSD: in.c,v 1.224 2018/04/06 09:19: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.223 2018/03/06 07:27:55 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.224 2018/04/06 09:19:16 ozaki-r Exp $");
#include "arp.h"
@@ -1143,14 +1143,12 @@ in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia,
* 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) {
- ia->ia4_flags &= ~IN_IFF_DUPLICATED;
+ if (ia->ia4_flags & IN_IFF_DUPLICATED)
hostIsNew = 1;
- }
- if (ifp->if_link_state == LINK_STATE_DOWN) {
+ ia->ia4_flags = 0;
+ 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))
+ else if (hostIsNew && if_do_dad(ifp))
ia->ia4_flags |= IN_IFF_TRYTENTATIVE;
/*