Module Name:    src
Committed By:   christos
Date:           Sun Apr  8 13:52:22 UTC 2018

Modified Files:
        src/sys/netinet: in.c

Log Message:
Protect ip_dad_count with if NARP > 0 to fix compilation


To generate a diff of this commit:
cvs rdiff -u -r1.227 -r1.228 src/sys/netinet/in.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.227 src/sys/netinet/in.c:1.228
--- src/sys/netinet/in.c:1.227	Fri Apr  6 12:03:16 2018
+++ src/sys/netinet/in.c	Sun Apr  8 09:52:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.227 2018/04/06 16:03:16 ozaki-r Exp $	*/
+/*	$NetBSD: in.c,v 1.228 2018/04/08 13:52:22 christos 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.227 2018/04/06 16:03:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.228 2018/04/08 13:52:22 christos Exp $");
 
 #include "arp.h"
 
@@ -1150,7 +1150,11 @@ in_ifinit(struct ifnet *ifp, struct in_i
 	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) && ip_dad_count > 0)
+	} else if (hostIsNew && if_do_dad(ifp)
+#if NARP > 0
+	    && ip_dad_count > 0
+#endif
+	)
 		ia->ia4_flags |= IN_IFF_TRYTENTATIVE;
 
 	/*

Reply via email to