Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix build dependency of if_llatbl.c
details: https://anonhg.NetBSD.org/src/rev/32c32f00eea3
branches: trunk
changeset: 811997:32c32f00eea3
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Nov 26 01:41:20 2015 +0000
description:
Fix build dependency of if_llatbl.c
if_llatbl.c is required if inet or inet6 is enabled. Depending on ether
doesn't suit for NDP case.
diffstat:
sys/kern/init_main.c | 8 ++++----
sys/net/files.net | 4 ++--
sys/net/if_llatbl.c | 8 ++++++--
sys/netinet/in.c | 19 ++++++++++---------
4 files changed, 22 insertions(+), 17 deletions(-)
diffs (168 lines):
diff -r 0eb5e87cb54c -r 32c32f00eea3 sys/kern/init_main.c
--- a/sys/kern/init_main.c Thu Nov 26 01:05:08 2015 +0000
+++ b/sys/kern/init_main.c Thu Nov 26 01:41:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.474 2015/11/20 18:34:17 christos Exp $ */
+/* $NetBSD: init_main.c,v 1.475 2015/11/26 01:41:20 ozaki-r Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,9 +97,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.474 2015/11/20 18:34:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.475 2015/11/26 01:41:20 ozaki-r Exp $");
#include "opt_ddb.h"
+#include "opt_inet.h"
#include "opt_ipsec.h"
#include "opt_modular.h"
#include "opt_ntp.h"
@@ -121,7 +122,6 @@
#endif
#include "drvctl.h"
-#include "ether.h"
#include "ksyms.h"
#include "veriexec.h"
@@ -543,7 +543,7 @@
*/
s = splnet();
ifinit();
-#if NETHER > 0
+#if defined(INET) || defined(INET6)
lltableinit();
#endif
domaininit(true);
diff -r 0eb5e87cb54c -r 32c32f00eea3 sys/net/files.net
--- a/sys/net/files.net Thu Nov 26 01:05:08 2015 +0000
+++ b/sys/net/files.net Thu Nov 26 01:41:20 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.net,v 1.7 2015/08/31 08:02:44 ozaki-r Exp $
+# $NetBSD: files.net,v 1.8 2015/11/26 01:41:20 ozaki-r Exp $
# XXX CLEANUP
define net
@@ -22,7 +22,7 @@
file net/if_gre.c gre needs-flag
file net/if_hippisubr.c hippi needs-flag
file net/if_ieee1394subr.c ieee1394
-file net/if_llatbl.c ether
+file net/if_llatbl.c inet | inet6
file net/if_loop.c loop
file net/if_media.c net
file net/if_mpls.c ifmpls needs-flag
diff -r 0eb5e87cb54c -r 32c32f00eea3 sys/net/if_llatbl.c
--- a/sys/net/if_llatbl.c Thu Nov 26 01:05:08 2015 +0000
+++ b/sys/net/if_llatbl.c Thu Nov 26 01:41:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_llatbl.c,v 1.8 2015/11/25 06:21:26 ozaki-r Exp $ */
+/* $NetBSD: if_llatbl.c,v 1.9 2015/11/26 01:41:20 ozaki-r Exp $ */
/*
* Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
* Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -35,6 +35,8 @@
#include "opt_inet6.h"
#endif
+#include "arp.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
@@ -615,13 +617,15 @@
laflags = lle->la_flags;
LLE_WUNLOCK(lle);
IF_AFDATA_WUNLOCK(ifp);
-#ifdef INET
+#if defined(INET) && NARP > 0
/* gratuitous ARP */
if ((laflags & LLE_PUB) && dst->sa_family == AF_INET)
arprequest(ifp,
&((const struct sockaddr_in *)dst)->sin_addr,
&((const struct sockaddr_in *)dst)->sin_addr,
CLLADDR(dl));
+#else
+ (void)laflags;
#endif
break;
diff -r 0eb5e87cb54c -r 32c32f00eea3 sys/netinet/in.c
--- a/sys/netinet/in.c Thu Nov 26 01:05:08 2015 +0000
+++ b/sys/netinet/in.c Thu Nov 26 01:41:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.162 2015/11/16 05:39:39 ozaki-r Exp $ */
+/* $NetBSD: in.c,v 1.163 2015/11/26 01:41:20 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,10 +91,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.162 2015/11/16 05:39:39 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.163 2015/11/26 01:41:20 ozaki-r Exp $");
#include "arp.h"
-#include "ether.h"
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1536,7 +1535,7 @@
return satosin(&ia->ia_addr);
}
-#if NETHER > 0
+#if NARP > 0
struct in_llentry {
struct llentry base;
@@ -1856,7 +1855,7 @@
return lle;
}
-#endif /* NETHER > 0 */
+#endif /* NARP > 0 */
static void
in_sysctl_init(struct sysctllog **clog)
@@ -1891,7 +1890,8 @@
IPCTL_HOSTZEROBROADCAST, CTL_EOL);
}
-#if NETHER > 0
+#if NARP > 0
+
static struct lltable *
in_lltattach(struct ifnet *ifp)
{
@@ -1915,7 +1915,8 @@
return (llt);
}
-#endif /* NETHER > 0 */
+
+#endif /* NARP > 0 */
void *
in_domifattach(struct ifnet *ifp)
@@ -1925,7 +1926,7 @@
ii = kmem_zalloc(sizeof(struct in_ifinfo), KM_SLEEP);
KASSERT(ii != NULL);
-#if NETHER > 0
+#if NARP > 0
ii->ii_llt = in_lltattach(ifp);
#endif
@@ -1945,7 +1946,7 @@
#ifdef IPSELSRC
in_selsrc_domifdetach(ifp, ii->ii_selsrc);
#endif
-#if NETHER > 0
+#if NARP > 0
lltable_free(ii->ii_llt);
#endif
kmem_free(ii, sizeof(struct in_ifinfo));
Home |
Main Index |
Thread Index |
Old Index