summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2010-04-29 11:52:42 +0000
committerbz <bz@FreeBSD.org>2010-04-29 11:52:42 +0000
commit0a90ef17283bc848eee90c3bdd5bec3fcc1bc879 (patch)
treee6f9695e24617b291f2a8f0b1f388eda2e605549 /sys/netinet6
parent043deeb56455e1129861bf93ec57f03b90200344 (diff)
downloadFreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.zip
FreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.tar.gz
MFP4: @176978-176982, 176984, 176990-176994, 177441
"Whitspace" churn after the VIMAGE/VNET whirls. Remove the need for some "init" functions within the network stack, like pim6_init(), icmp_init() or significantly shorten others like ip6_init() and nd6_init(), using static initialization again where possible and formerly missed. Move (most) variables back to the place they used to be before the container structs and VIMAGE_GLOABLS (before r185088) and try to reduce the diff to stable/7 and earlier as good as possible, to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9. This also removes some header file pollution for putatively static global variables. Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are no longer needed. Reviewed by: jhb Discussed with: rwatson Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH MFC after: 6 days
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/frag6.c5
-rw-r--r--sys/netinet6/icmp6.c21
-rw-r--r--sys/netinet6/in6_gif.c9
-rw-r--r--sys/netinet6/in6_ifattach.c11
-rw-r--r--sys/netinet6/in6_proto.c84
-rw-r--r--sys/netinet6/in6_rmx.c23
-rw-r--r--sys/netinet6/in6_src.c7
-rw-r--r--sys/netinet6/in6_var.h9
-rw-r--r--sys/netinet6/ip6_input.c107
-rw-r--r--sys/netinet6/ip6_mroute.c19
-rw-r--r--sys/netinet6/ip6_var.h53
-rw-r--r--sys/netinet6/nd6.c77
-rw-r--r--sys/netinet6/nd6.h9
-rw-r--r--sys/netinet6/nd6_nbr.c8
-rw-r--r--sys/netinet6/nd6_rtr.c12
-rw-r--r--sys/netinet6/raw_ip6.c4
-rw-r--r--sys/netinet6/scope6.c12
17 files changed, 175 insertions, 295 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 8900f7d..1523133 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -106,16 +106,17 @@ void
frag6_init(void)
{
- V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q;
V_ip6_maxfragpackets = nmbclusters / 4;
V_ip6_maxfrags = nmbclusters / 4;
+ V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q;
if (!IS_DEFAULT_VNET(curvnet))
return;
- IP6Q_LOCK_INIT();
EVENTHANDLER_REGISTER(nmbclusters_change,
frag6_change, NULL, EVENTHANDLER_PRI_ANY);
+
+ IP6Q_LOCK_INIT();
}
/*
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 57f8d32..87df9c3 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -113,23 +113,22 @@ __FBSDID("$FreeBSD$");
extern struct domain inet6domain;
+VNET_DEFINE(struct icmp6stat, icmp6stat);
+
VNET_DECLARE(struct inpcbinfo, ripcbinfo);
VNET_DECLARE(struct inpcbhead, ripcb);
VNET_DECLARE(int, icmp6errppslim);
+static VNET_DEFINE(int, icmp6errpps_count) = 0;
+static VNET_DEFINE(struct timeval, icmp6errppslim_last);
VNET_DECLARE(int, icmp6_nodeinfo);
#define V_ripcbinfo VNET(ripcbinfo)
#define V_ripcb VNET(ripcb)
#define V_icmp6errppslim VNET(icmp6errppslim)
+#define V_icmp6errpps_count VNET(icmp6errpps_count)
+#define V_icmp6errppslim_last VNET(icmp6errppslim_last)
#define V_icmp6_nodeinfo VNET(icmp6_nodeinfo)
-VNET_DEFINE(struct icmp6stat, icmp6stat);
-static VNET_DEFINE(int, icmp6errpps_count);
-static VNET_DEFINE(struct timeval, icmp6errppslim_last);
-
-#define V_icmp6errpps_count VNET(icmp6errpps_count)
-#define V_icmp6errppslim_last VNET(icmp6errppslim_last)
-
static void icmp6_errcount(struct icmp6errstat *, int, int);
static int icmp6_rip6_input(struct mbuf **, int);
static int icmp6_ratelimit(const struct in6_addr *, const int, const int);
@@ -144,14 +143,6 @@ static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct icmp6_nodeinfo *
struct ifnet *, int));
static int icmp6_notify_error(struct mbuf **, int, int, int);
-
-void
-icmp6_init(void)
-{
-
- V_icmp6errpps_count = 0;
-}
-
/*
* Kernel module interface for updating icmp6stat. The argument is an index
* into icmp6stat treated as an array of u_quad_t. While this encodes the
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c
index a481706..e786836 100644
--- a/sys/netinet6/in6_gif.c
+++ b/sys/netinet6/in6_gif.c
@@ -41,8 +41,10 @@ __FBSDID("$FreeBSD$");
#include <sys/sockio.h>
#include <sys/mbuf.h>
#include <sys/errno.h>
+#include <sys/kernel.h>
#include <sys/queue.h>
#include <sys/syslog.h>
+#include <sys/sysctl.h>
#include <sys/protosw.h>
#include <sys/malloc.h>
@@ -69,6 +71,13 @@ __FBSDID("$FreeBSD$");
#include <net/if_gif.h>
+VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM;
+#define V_ip6_gif_hlim VNET(ip6_gif_hlim)
+
+SYSCTL_DECL(_net_inet6_ip6);
+SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_RW,
+ &VNET_NAME(ip6_gif_hlim), 0, "");
+
static int gif_validate6(const struct ip6_hdr *, struct gif_softc *,
struct ifnet *);
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index 5041ee2..363d7be 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -67,10 +67,15 @@ __FBSDID("$FreeBSD$");
#include <netinet6/mld6_var.h>
#include <netinet6/scope6_var.h>
-VNET_DEFINE(unsigned long, in6_maxmtu);
-VNET_DEFINE(int, ip6_auto_linklocal);
-VNET_DEFINE(struct callout, in6_tmpaddrtimer_ch);
+VNET_DEFINE(unsigned long, in6_maxmtu) = 0;
+
+#ifdef IP6_AUTO_LINKLOCAL
+VNET_DEFINE(int, ip6_auto_linklocal) = IP6_AUTO_LINKLOCAL;
+#else
+VNET_DEFINE(int, ip6_auto_linklocal) = 1; /* enabled by default */
+#endif
+VNET_DEFINE(struct callout, in6_tmpaddrtimer_ch);
#define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch)
VNET_DECLARE(struct inpcbinfo, ripcbinfo);
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index 3289e57..51f5187 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -234,7 +234,6 @@ struct ip6protosw inet6sw[] = {
.pr_output = rip6_output,
.pr_ctlinput = rip6_ctlinput,
.pr_ctloutput = rip6_ctloutput,
- .pr_init = icmp6_init,
.pr_fasttimo = icmp6_fasttimo,
.pr_slowtimo = icmp6_slowtimo,
.pr_usrreqs = &rip6_usrreqs
@@ -378,25 +377,44 @@ VNET_DOMAIN_SET(inet6);
/*
* Internet configuration info
*/
-VNET_DEFINE(int, ip6_forwarding);
-VNET_DEFINE(int, ip6_sendredirects);
-VNET_DEFINE(int, ip6_defhlim);
-VNET_DEFINE(int, ip6_defmcasthlim);
-VNET_DEFINE(int, ip6_accept_rtadv);
-VNET_DEFINE(int, ip6_maxfragpackets);
-VNET_DEFINE(int, ip6_maxfrags);
-VNET_DEFINE(int, ip6_log_interval);
-VNET_DEFINE(int, ip6_hdrnestlimit);
-VNET_DEFINE(int, ip6_dad_count);
-VNET_DEFINE(int, ip6_auto_flowlabel);
-VNET_DEFINE(int, ip6_use_deprecated);
-VNET_DEFINE(int, ip6_rr_prune);
-VNET_DEFINE(int, ip6_mcast_pmtu);
-VNET_DEFINE(int, ip6_v6only);
-VNET_DEFINE(int, ip6_keepfaith);
-VNET_DEFINE(time_t, ip6_log_time);
-VNET_DEFINE(int, ip6stealth);
-VNET_DEFINE(int, nd6_onlink_ns_rfc4861);
+#ifndef IPV6FORWARDING
+#ifdef GATEWAY6
+#define IPV6FORWARDING 1 /* forward IP6 packets not for us */
+#else
+#define IPV6FORWARDING 0 /* don't forward IP6 packets not for us */
+#endif /* GATEWAY6 */
+#endif /* !IPV6FORWARDING */
+
+#ifndef IPV6_SENDREDIRECTS
+#define IPV6_SENDREDIRECTS 1
+#endif
+
+VNET_DEFINE(int, ip6_forwarding) = IPV6FORWARDING; /* act as router? */
+VNET_DEFINE(int, ip6_sendredirects) = IPV6_SENDREDIRECTS;
+VNET_DEFINE(int, ip6_defhlim) = IPV6_DEFHLIM;
+VNET_DEFINE(int, ip6_defmcasthlim) = IPV6_DEFAULT_MULTICAST_HOPS;
+VNET_DEFINE(int, ip6_accept_rtadv) = 0;
+VNET_DEFINE(int, ip6_maxfragpackets); /* initialized in frag6.c:frag6_init() */
+VNET_DEFINE(int, ip6_maxfrags); /* initialized in frag6.c:frag6_init() */
+VNET_DEFINE(int, ip6_log_interval) = 5;
+VNET_DEFINE(int, ip6_hdrnestlimit) = 15;/* How many header options will we
+ * process? */
+VNET_DEFINE(int, ip6_dad_count) = 1; /* DupAddrDetectionTransmits */
+VNET_DEFINE(int, ip6_auto_flowlabel) = 1;
+VNET_DEFINE(int, ip6_use_deprecated) = 1;/* allow deprecated addr
+ * (RFC2462 5.5.4) */
+VNET_DEFINE(int, ip6_rr_prune) = 5; /* router renumbering prefix
+ * walk list every 5 sec. */
+VNET_DEFINE(int, ip6_mcast_pmtu) = 0; /* enable pMTU discovery for multicast? */
+VNET_DEFINE(int, ip6_v6only) = 1;
+
+VNET_DEFINE(int, ip6_keepfaith) = 0;
+VNET_DEFINE(time_t, ip6_log_time) = (time_t)0L;
+#ifdef IPSTEALTH
+VNET_DEFINE(int, ip6stealth) = 0;
+#endif
+VNET_DEFINE(int, nd6_onlink_ns_rfc4861) = 0;/* allow 'on-link' nd6 NS
+ * (RFC 4861) */
/* icmp6 */
/*
@@ -404,26 +422,31 @@ VNET_DEFINE(int, nd6_onlink_ns_rfc4861);
* XXX: what if we don't define INET? Should we define pmtu6_expire
* or so? (jinmei@kame.net 19990310)
*/
-VNET_DEFINE(int, pmtu_expire);
-VNET_DEFINE(int, pmtu_probe);
+VNET_DEFINE(int, pmtu_expire) = 60*10;
+VNET_DEFINE(int, pmtu_probe) = 60*2;
/* raw IP6 parameters */
/*
* Nominal space allocated to a raw ip socket.
*/
-VNET_DEFINE(u_long, rip6_sendspace);
-VNET_DEFINE(u_long, rip6_recvspace);
+#define RIPV6SNDQ 8192
+#define RIPV6RCVQ 8192
+
+VNET_DEFINE(u_long, rip6_sendspace) = RIPV6SNDQ;
+VNET_DEFINE(u_long, rip6_recvspace) = RIPV6RCVQ;
/* ICMPV6 parameters */
-VNET_DEFINE(int, icmp6_rediraccept);
-VNET_DEFINE(int, icmp6_redirtimeout);
-VNET_DEFINE(int, icmp6errppslim);
+VNET_DEFINE(int, icmp6_rediraccept) = 1;/* accept and process redirects */
+VNET_DEFINE(int, icmp6_redirtimeout) = 10 * 60; /* 10 minutes */
+VNET_DEFINE(int, icmp6errppslim) = 100; /* 100pps */
/* control how to respond to NI queries */
-VNET_DEFINE(int, icmp6_nodeinfo);
+VNET_DEFINE(int, icmp6_nodeinfo) =
+ (ICMP6_NODEINFO_FQDNOK|ICMP6_NODEINFO_NODEADDROK);
/* UDP on IP6 parameters */
-VNET_DEFINE(int, udp6_sendspace);
-VNET_DEFINE(int, udp6_recvspace);
+VNET_DEFINE(int, udp6_sendspace) = 9216;/* really max datagram size */
+VNET_DEFINE(int, udp6_recvspace) = 40 * (1024 + sizeof(struct sockaddr_in6));
+ /* 40 1K datagrams */
/*
* sysctl related items.
@@ -571,7 +594,6 @@ SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXNUDHINT, nd6_maxnudhint,
CTLFLAG_RW, &VNET_NAME(nd6_maxnudhint), 0, "");
SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DEBUG, nd6_debug, CTLFLAG_RW,
&VNET_NAME(nd6_debug), 0, "");
-
SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_ONLINKNSRFC4861,
nd6_onlink_ns_rfc4861, CTLFLAG_RW, &VNET_NAME(nd6_onlink_ns_rfc4861),
0, "Accept 'on-link' nd6 NS in compliance with RFC 4861.");
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 1ae04c3..8927a17 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -204,20 +204,21 @@ in6_matroute(void *v_arg, struct radix_node_head *head)
SYSCTL_DECL(_net_inet6_ip6);
-static VNET_DEFINE(int, rtq_reallyold6);
-static VNET_DEFINE(int, rtq_minreallyold6);
-static VNET_DEFINE(int, rtq_toomany6);
-
+static VNET_DEFINE(int, rtq_reallyold6) = 60*60;
+ /* one hour is ``really old'' */
#define V_rtq_reallyold6 VNET(rtq_reallyold6)
-#define V_rtq_minreallyold6 VNET(rtq_minreallyold6)
-#define V_rtq_toomany6 VNET(rtq_toomany6)
-
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, CTLFLAG_RW,
&VNET_NAME(rtq_reallyold6) , 0, "");
+static VNET_DEFINE(int, rtq_minreallyold6) = 10;
+ /* never automatically crank down to less */
+#define V_rtq_minreallyold6 VNET(rtq_minreallyold6)
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW,
&VNET_NAME(rtq_minreallyold6) , 0, "");
+static VNET_DEFINE(int, rtq_toomany6) = 128;
+ /* 128 cached routes is ``too many'' */
+#define V_rtq_toomany6 VNET(rtq_toomany6)
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW,
&VNET_NAME(rtq_toomany6) , 0, "");
@@ -277,7 +278,7 @@ in6_rtqkill(struct radix_node *rn, void *rock)
}
#define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */
-static VNET_DEFINE(int, rtq_timeout6);
+static VNET_DEFINE(int, rtq_timeout6) = RTQ_TIMEOUT;
static VNET_DEFINE(struct callout, rtq_timer6);
#define V_rtq_timeout6 VNET(rtq_timeout6)
@@ -346,7 +347,6 @@ struct mtuex_arg {
struct radix_node_head *rnh;
time_t nextstop;
};
-
static VNET_DEFINE(struct callout, rtq_mtutimer);
#define V_rtq_mtutimer VNET(rtq_mtutimer)
@@ -422,11 +422,6 @@ in6_inithead(void **head, int off)
if (off == 0) /* See above */
return 1; /* only do the rest for the real thing */
- V_rtq_reallyold6 = 60*60; /* one hour is ``really old'' */
- V_rtq_minreallyold6 = 10; /* never automatically crank down to less */
- V_rtq_toomany6 = 128; /* 128 cached routes is ``too many'' */
- V_rtq_timeout6 = RTQ_TIMEOUT;
-
rnh = *head;
KASSERT(rnh == rt_tables_get_rnh(0, AF_INET6), ("rnh?"));
rnh->rnh_addaddr = in6_addroute;
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index e6c2cd8..49bc715 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -122,12 +122,11 @@ static struct sx addrsel_sxlock;
#define ADDRSEL_XUNLOCK() sx_xunlock(&addrsel_sxlock)
#define ADDR_LABEL_NOTAPP (-1)
-
static VNET_DEFINE(struct in6_addrpolicy, defaultaddrpolicy);
-VNET_DEFINE(int, ip6_prefer_tempaddr);
-
#define V_defaultaddrpolicy VNET(defaultaddrpolicy)
+VNET_DEFINE(int, ip6_prefer_tempaddr) = 0;
+
static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *,
struct ip6_moptions *, struct route_in6 *, struct ifnet **,
struct rtentry **, int));
@@ -952,8 +951,6 @@ void
addrsel_policy_init(void)
{
- V_ip6_prefer_tempaddr = 0;
-
init_policy_queue();
/* initialize the "last resort" policy */
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index d0a54e0..00342fd 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -487,12 +487,7 @@ struct in6_rrenumreq {
#ifdef _KERNEL
VNET_DECLARE(struct in6_ifaddrhead, in6_ifaddrhead);
-VNET_DECLARE(struct icmp6stat, icmp6stat);
-VNET_DECLARE(unsigned long, in6_maxmtu);
-
#define V_in6_ifaddrhead VNET(in6_ifaddrhead)
-#define V_icmp6stat VNET(icmp6stat)
-#define V_in6_maxmtu VNET(in6_maxmtu)
extern struct rwlock in6_ifaddr_lock;
#define IN6_IFADDR_LOCK_ASSERT( ) rw_assert(&in6_ifaddr_lock, RA_LOCKED)
@@ -503,6 +498,8 @@ extern struct rwlock in6_ifaddr_lock;
#define IN6_IFADDR_WLOCK_ASSERT() rw_assert(&in6_ifaddr_lock, RA_WLOCKED)
#define IN6_IFADDR_WUNLOCK() rw_wunlock(&in6_ifaddr_lock)
+VNET_DECLARE(struct icmp6stat, icmp6stat);
+#define V_icmp6stat VNET(icmp6stat)
#define in6_ifstat_inc(ifp, tag) \
do { \
if (ifp) \
@@ -511,6 +508,8 @@ do { \
extern struct in6_addr zeroin6_addr;
extern u_char inet6ctlerrmap[];
+VNET_DECLARE(unsigned long, in6_maxmtu);
+#define V_in6_maxmtu VNET(in6_maxmtu)
#endif /* _KERNEL */
/*
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index c244f37..42f9351 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -116,6 +116,7 @@ __FBSDID("$FreeBSD$");
extern struct domain inet6domain;
u_char ip6_protox[IPPROTO_MAX];
+VNET_DEFINE(struct in6_ifaddrhead, in6_ifaddrhead);
static struct netisr_handler ip6_nh = {
.nh_name = "ip6",
@@ -124,36 +125,16 @@ static struct netisr_handler ip6_nh = {
.nh_policy = NETISR_POLICY_FLOW,
};
-VNET_DEFINE(struct in6_ifaddrhead, in6_ifaddrhead);
-VNET_DEFINE(struct ip6stat, ip6stat);
-
VNET_DECLARE(struct callout, in6_tmpaddrtimer_ch);
-VNET_DECLARE(int, dad_init);
-VNET_DECLARE(int, pmtu_expire);
-VNET_DECLARE(int, pmtu_probe);
-VNET_DECLARE(u_long, rip6_sendspace);
-VNET_DECLARE(u_long, rip6_recvspace);
-VNET_DECLARE(int, icmp6errppslim);
-VNET_DECLARE(int, icmp6_nodeinfo);
-VNET_DECLARE(int, udp6_sendspace);
-VNET_DECLARE(int, udp6_recvspace);
-
#define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch)
-#define V_dad_init VNET(dad_init)
-#define V_pmtu_expire VNET(pmtu_expire)
-#define V_pmtu_probe VNET(pmtu_probe)
-#define V_rip6_sendspace VNET(rip6_sendspace)
-#define V_rip6_recvspace VNET(rip6_recvspace)
-#define V_icmp6errppslim VNET(icmp6errppslim)
-#define V_icmp6_nodeinfo VNET(icmp6_nodeinfo)
-#define V_udp6_sendspace VNET(udp6_sendspace)
-#define V_udp6_recvspace VNET(udp6_recvspace)
+
+VNET_DEFINE(struct pfil_head, inet6_pfil_hook);
+
+VNET_DEFINE(struct ip6stat, ip6stat);
struct rwlock in6_ifaddr_lock;
RW_SYSINIT(in6_ifaddr_lock, &in6_ifaddr_lock, "in6_ifaddr_lock");
-VNET_DEFINE (struct pfil_head, inet6_pfil_hook);
-
static void ip6_init2(void *);
static struct ip6aux *ip6_setdstifaddr(struct mbuf *, struct in6_ifaddr *);
static int ip6_hopopts_input(u_int32_t *, u_int32_t *, struct mbuf **, int *);
@@ -171,82 +152,11 @@ ip6_init(void)
struct ip6protosw *pr;
int i;
- V_in6_maxmtu = 0;
-#ifdef IP6_AUTO_LINKLOCAL
- V_ip6_auto_linklocal = IP6_AUTO_LINKLOCAL;
-#else
- V_ip6_auto_linklocal = 1; /* enabled by default */
-#endif
TUNABLE_INT_FETCH("net.inet6.ip6.auto_linklocal",
&V_ip6_auto_linklocal);
-#ifndef IPV6FORWARDING
-#ifdef GATEWAY6
-#define IPV6FORWARDING 1 /* forward IP6 packets not for us */
-#else
-#define IPV6FORWARDING 0 /* don't forward IP6 packets not for us */
-#endif /* GATEWAY6 */
-#endif /* !IPV6FORWARDING */
-
-#ifndef IPV6_SENDREDIRECTS
-#define IPV6_SENDREDIRECTS 1
-#endif
-
- V_ip6_forwarding = IPV6FORWARDING; /* act as router? */
- V_ip6_sendredirects = IPV6_SENDREDIRECTS;
- V_ip6_defhlim = IPV6_DEFHLIM;
- V_ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;
- V_ip6_accept_rtadv = 0;
- V_ip6_log_interval = 5;
- V_ip6_hdrnestlimit = 15; /* How many header options will we process? */
- V_ip6_dad_count = 1; /* DupAddrDetectionTransmits */
- V_ip6_auto_flowlabel = 1;
- V_ip6_use_deprecated = 1;/* allow deprecated addr (RFC2462 5.5.4) */
- V_ip6_rr_prune = 5; /* router renumbering prefix
- * walk list every 5 sec. */
- V_ip6_mcast_pmtu = 0; /* enable pMTU discovery for multicast? */
- V_ip6_v6only = 1;
- V_ip6_keepfaith = 0;
- V_ip6_log_time = (time_t)0L;
-#ifdef IPSTEALTH
- V_ip6stealth = 0;
-#endif
- V_nd6_onlink_ns_rfc4861 = 0; /* allow 'on-link' nd6 NS (RFC 4861) */
-
- V_pmtu_expire = 60*10;
- V_pmtu_probe = 60*2;
-
- /* raw IP6 parameters */
- /*
- * Nominal space allocated to a raw ip socket.
- */
-#define RIPV6SNDQ 8192
-#define RIPV6RCVQ 8192
- V_rip6_sendspace = RIPV6SNDQ;
- V_rip6_recvspace = RIPV6RCVQ;
-
- /* ICMPV6 parameters */
- V_icmp6_rediraccept = 1; /* accept and process redirects */
- V_icmp6_redirtimeout = 10 * 60; /* 10 minutes */
- V_icmp6errppslim = 100; /* 100pps */
- /* control how to respond to NI queries */
- V_icmp6_nodeinfo = (ICMP6_NODEINFO_FQDNOK|ICMP6_NODEINFO_NODEADDROK);
-
- /* UDP on IP6 parameters */
- V_udp6_sendspace = 9216; /* really max datagram size */
- V_udp6_recvspace = 40 * (1024 + sizeof(struct sockaddr_in6));
- /* 40 1K datagrams */
- V_dad_init = 0;
-
TAILQ_INIT(&V_in6_ifaddrhead);
- scope6_init();
- addrsel_policy_init();
- nd6_init();
- frag6_init();
-
- V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR;
-
/* Initialize packet filter hooks. */
V_inet6_pfil_hook.ph_type = PFIL_TYPE_AF;
V_inet6_pfil_hook.ph_af = AF_INET6;
@@ -254,6 +164,13 @@ ip6_init(void)
printf("%s: WARNING: unable to register pfil hook, "
"error %d\n", __func__, i);
+ scope6_init();
+ addrsel_policy_init();
+ nd6_init();
+ frag6_init();
+
+ V_ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR;
+
/* Skip global initialization stuff for non-default instances. */
if (!IS_DEFAULT_VNET(curvnet))
return;
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 5496062..0c1ff78 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -130,7 +130,6 @@ static MALLOC_DEFINE(M_MRTABLE6, "mf6c", "multicast forwarding cache entry");
static int ip6_mdq(struct mbuf *, struct ifnet *, struct mf6c *);
static void phyint_send(struct ip6_hdr *, struct mif6 *, struct mbuf *);
-static void pim6_init(void);
static int register_send(struct ip6_hdr *, struct mif6 *, struct mbuf *);
static int set_pim6(int *);
static int socket_send(struct socket *, struct mbuf *,
@@ -148,12 +147,11 @@ static const struct ip6protosw in6_pim_protosw = {
.pr_input = pim6_input,
.pr_output = rip6_output,
.pr_ctloutput = rip6_ctloutput,
- .pr_init = pim6_init,
.pr_usrreqs = &rip6_usrreqs
};
static int pim6_encapcheck(const struct mbuf *, int, int, void *);
-static VNET_DEFINE(int, ip6_mrouter_ver);
+static VNET_DEFINE(int, ip6_mrouter_ver) = 0;
#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver)
SYSCTL_DECL(_net_inet6);
@@ -212,7 +210,7 @@ static struct mtx mif6_mtx;
#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
#ifdef MRT6DEBUG
-static VNET_DEFINE(u_int, mrt6debug); /* debug level */
+static VNET_DEFINE(u_int, mrt6debug) = 0; /* debug level */
#define V_mrt6debug VNET(mrt6debug)
#define DEBUG_MFC 0x02
#define DEBUG_FORWARD 0x04
@@ -338,15 +336,6 @@ int X_ip6_mrouter_set(struct socket *, struct sockopt *);
int X_ip6_mrouter_get(struct socket *, struct sockopt *);
int X_mrt6_ioctl(u_long, caddr_t);
-static void
-pim6_init(void)
-{
-
-#ifdef MRT6DEBUG
- V_mrt6debug = 0; /* debug level */
-#endif
-}
-
/*
* Handle MRT setsockopt commands to modify the multicast routing tables.
*/
@@ -533,11 +522,7 @@ static int
ip6_mrouter_init(struct socket *so, int v, int cmd)
{
- V_ip6_mrouter_ver = 0;
-
#ifdef MRT6DEBUG
- V_mrt6debug = 0;
-
if (V_mrt6debug)
log(LOG_DEBUG,
"ip6_mrouter_init: so_type = %d, pr_protocol = %d\n",
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h
index a0a0f3a..3e91a79 100644
--- a/sys/netinet6/ip6_var.h
+++ b/sys/netinet6/ip6_var.h
@@ -295,12 +295,20 @@ VNET_DECLARE(struct ip6stat, ip6stat); /* statistics */
VNET_DECLARE(int, ip6_defhlim); /* default hop limit */
VNET_DECLARE(int, ip6_defmcasthlim); /* default multicast hop limit */
VNET_DECLARE(int, ip6_forwarding); /* act as router? */
-VNET_DECLARE(int, ip6_gif_hlim); /* Hop limit for gif encap packet */
VNET_DECLARE(int, ip6_use_deprecated); /* allow deprecated addr as source */
VNET_DECLARE(int, ip6_rr_prune); /* router renumbering prefix
* walk list every 5 sec. */
VNET_DECLARE(int, ip6_mcast_pmtu); /* enable pMTU discovery for multicast? */
VNET_DECLARE(int, ip6_v6only);
+#define V_ip6stat VNET(ip6stat)
+#define V_ip6_defhlim VNET(ip6_defhlim)
+#define V_ip6_defmcasthlim VNET(ip6_defmcasthlim)
+#define V_ip6_forwarding VNET(ip6_forwarding)
+#define V_ip6_use_deprecated VNET(ip6_use_deprecated)
+#define V_ip6_rr_prune VNET(ip6_rr_prune)
+#define V_ip6_mcast_pmtu VNET(ip6_mcast_pmtu)
+#define V_ip6_v6only VNET(ip6_v6only)
+
VNET_DECLARE(struct socket *, ip6_mrouter); /* multicast routing daemon */
VNET_DECLARE(int, ip6_sendredirects); /* send IP redirects when forwarding? */
VNET_DECLARE(int, ip6_maxfragpackets); /* Maximum packets in reassembly
@@ -314,31 +322,6 @@ VNET_DECLARE(time_t, ip6_log_time);
VNET_DECLARE(int, ip6_hdrnestlimit); /* upper limit of # of extension
* headers */
VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionTransmits */
-
-VNET_DECLARE(int, ip6_auto_flowlabel);
-VNET_DECLARE(int, ip6_auto_linklocal);
-
-VNET_DECLARE(int, ip6_use_tempaddr); /* Whether to use temporary addresses */
-VNET_DECLARE(int, ip6_prefer_tempaddr); /* Whether to prefer temporary
- * addresses in the source address
- * selection */
-
-#ifdef IPSTEALTH
-VNET_DECLARE(int, ip6stealth);
-#endif
-
-VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope
- * zone when unspecified */
-
-#define V_ip6stat VNET(ip6stat)
-#define V_ip6_defhlim VNET(ip6_defhlim)
-#define V_ip6_defmcasthlim VNET(ip6_defmcasthlim)
-#define V_ip6_forwarding VNET(ip6_forwarding)
-#define V_ip6_gif_hlim VNET(ip6_gif_hlim)
-#define V_ip6_use_deprecated VNET(ip6_use_deprecated)
-#define V_ip6_rr_prune VNET(ip6_rr_prune)
-#define V_ip6_mcast_pmtu VNET(ip6_mcast_pmtu)
-#define V_ip6_v6only VNET(ip6_v6only)
#define V_ip6_mrouter VNET(ip6_mrouter)
#define V_ip6_sendredirects VNET(ip6_sendredirects)
#define V_ip6_maxfragpackets VNET(ip6_maxfragpackets)
@@ -349,17 +332,29 @@ VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope
#define V_ip6_log_time VNET(ip6_log_time)
#define V_ip6_hdrnestlimit VNET(ip6_hdrnestlimit)
#define V_ip6_dad_count VNET(ip6_dad_count)
+
+VNET_DECLARE(int, ip6_auto_flowlabel);
+VNET_DECLARE(int, ip6_auto_linklocal);
#define V_ip6_auto_flowlabel VNET(ip6_auto_flowlabel)
#define V_ip6_auto_linklocal VNET(ip6_auto_linklocal)
+
+VNET_DECLARE(int, ip6_use_tempaddr); /* Whether to use temporary addresses */
+VNET_DECLARE(int, ip6_prefer_tempaddr); /* Whether to prefer temporary
+ * addresses in the source address
+ * selection */
#define V_ip6_use_tempaddr VNET(ip6_use_tempaddr)
#define V_ip6_prefer_tempaddr VNET(ip6_prefer_tempaddr)
-#ifdef IPSTEALTH
-#define V_ip6stealth VNET(ip6stealth)
-#endif
+
+VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope
+ * zone when unspecified */
#define V_ip6_use_defzone VNET(ip6_use_defzone)
VNET_DECLARE (struct pfil_head, inet6_pfil_hook); /* packet filter hooks */
#define V_inet6_pfil_hook VNET(inet6_pfil_hook)
+#ifdef IPSTEALTH
+VNET_DECLARE(int, ip6stealth);
+#define V_ip6stealth VNET(ip6stealth)
+#endif
extern struct pr_usrreqs rip6_usrreqs;
struct sockopt;
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index a0ef204..7a54226 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -82,21 +82,31 @@ __FBSDID("$FreeBSD$");
#define SIN6(s) ((struct sockaddr_in6 *)s)
-VNET_DEFINE(int, nd6_prune);
-VNET_DEFINE(int, nd6_delay);
-VNET_DEFINE(int, nd6_umaxtries);
-VNET_DEFINE(int, nd6_mmaxtries);
-VNET_DEFINE(int, nd6_useloopback);
-VNET_DEFINE(int, nd6_gctimer);
+/* timer values */
+VNET_DEFINE(int, nd6_prune) = 1; /* walk list every 1 seconds */
+VNET_DEFINE(int, nd6_delay) = 5; /* delay first probe time 5 second */
+VNET_DEFINE(int, nd6_umaxtries) = 3; /* maximum unicast query */
+VNET_DEFINE(int, nd6_mmaxtries) = 3; /* maximum multicast query */
+VNET_DEFINE(int, nd6_useloopback) = 1; /* use loopback interface for
+ * local traffic */
+VNET_DEFINE(int, nd6_gctimer) = (60 * 60 * 24); /* 1 day: garbage
+ * collection timer */
/* preventing too many loops in ND option parsing */
-static VNET_DEFINE(int, nd6_maxndopt);
-VNET_DEFINE(int, nd6_maxnudhint);
-static VNET_DEFINE(int, nd6_maxqueuelen);
+static VNET_DEFINE(int, nd6_maxndopt) = 10; /* max # of ND options allowed */
+
+VNET_DEFINE(int, nd6_maxnudhint) = 0; /* max # of subsequent upper
+ * layer hints */
+static VNET_DEFINE(int, nd6_maxqueuelen) = 1; /* max pkts cached in unresolved
+ * ND entries */
#define V_nd6_maxndopt VNET(nd6_maxndopt)
#define V_nd6_maxqueuelen VNET(nd6_maxqueuelen)
-VNET_DEFINE(int, nd6_debug);
+#ifdef ND6_DEBUG
+VNET_DEFINE(int, nd6_debug) = 1;
+#else
+VNET_DEFINE(int, nd6_debug) = 0;
+#endif
/* for debugging? */
#if 0
@@ -106,7 +116,7 @@ static int nd6_inuse, nd6_allocated;
VNET_DEFINE(struct nd_drhead, nd_defrouter);
VNET_DEFINE(struct nd_prhead, nd_prefix);
-VNET_DEFINE(int, nd6_recalc_reachtm_interval);
+VNET_DEFINE(int, nd6_recalc_reachtm_interval) = ND6_RECALC_REACHTM_INTERVAL;
#define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval)
static struct sockaddr_in6 all1_sa;
@@ -125,56 +135,13 @@ static VNET_DEFINE(struct callout, nd6_slowtimo_ch);
VNET_DEFINE(struct callout, nd6_timer_ch);
-VNET_DECLARE(int, dad_ignore_ns);
-VNET_DECLARE(int, dad_maxtry);
-#define V_dad_ignore_ns VNET(dad_ignore_ns)
-#define V_dad_maxtry VNET(dad_maxtry)
-
void
nd6_init(void)
{
int i;
- V_nd6_prune = 1; /* walk list every 1 seconds */
- V_nd6_delay = 5; /* delay first probe time 5 second */
- V_nd6_umaxtries = 3; /* maximum unicast query */
- V_nd6_mmaxtries = 3; /* maximum multicast query */
- V_nd6_useloopback = 1; /* use loopback interface for local traffic */
- V_nd6_gctimer = (60 * 60 * 24); /* 1 day: garbage collection timer */
-
- /* preventing too many loops in ND option parsing */
- V_nd6_maxndopt = 10; /* max # of ND options allowed */
-
- V_nd6_maxnudhint = 0; /* max # of subsequent upper layer hints */
- V_nd6_maxqueuelen = 1; /* max pkts cached in unresolved ND entries */
-
-#ifdef ND6_DEBUG
- V_nd6_debug = 1;
-#else
- V_nd6_debug = 0;
-#endif
-
- V_nd6_recalc_reachtm_interval = ND6_RECALC_REACHTM_INTERVAL;
-
- V_dad_ignore_ns = 0; /* ignore NS in DAD - specwise incorrect*/
- V_dad_maxtry = 15; /* max # of *tries* to transmit DAD packet */
-
- /*
- * XXX just to get this to compile KMM
- */
-#ifdef notyet
- V_llinfo_nd6.ln_next = &V_llinfo_nd6;
- V_llinfo_nd6.ln_prev = &V_llinfo_nd6;
-#endif
LIST_INIT(&V_nd_prefix);
- V_ip6_use_tempaddr = 0;
- V_ip6_temp_preferred_lifetime = DEF_TEMP_PREFERRED_LIFETIME;
- V_ip6_temp_valid_lifetime = DEF_TEMP_VALID_LIFETIME;
- V_ip6_temp_regen_advance = TEMPADDR_REGEN_ADVANCE;
-
- V_ip6_desync_factor = 0;
-
all1_sa.sin6_family = AF_INET6;
all1_sa.sin6_len = sizeof(struct sockaddr_in6);
for (i = 0; i < sizeof(all1_sa.sin6_addr); i++)
@@ -182,13 +149,13 @@ nd6_init(void)
/* initialization of the default router list */
TAILQ_INIT(&V_nd_defrouter);
+
/* start timer */
callout_init(&V_nd6_slowtimo_ch, 0);
callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
nd6_slowtimo, curvnet);
}
-
#ifdef VIMAGE
void
nd6_destroy()
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
index ff8faa2..abcfcb7 100644
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -330,8 +330,6 @@ VNET_DECLARE(struct nd_drhead, nd_defrouter);
VNET_DECLARE(struct nd_prhead, nd_prefix);
VNET_DECLARE(int, nd6_debug);
VNET_DECLARE(int, nd6_onlink_ns_rfc4861);
-VNET_DECLARE(struct callout, nd6_timer_ch);
-
#define V_nd6_prune VNET(nd6_prune)
#define V_nd6_delay VNET(nd6_delay)
#define V_nd6_umaxtries VNET(nd6_umaxtries)
@@ -343,6 +341,10 @@ VNET_DECLARE(struct callout, nd6_timer_ch);
#define V_nd_prefix VNET(nd_prefix)
#define V_nd6_debug VNET(nd6_debug)
#define V_nd6_onlink_ns_rfc4861 VNET(nd6_onlink_ns_rfc4861)
+
+#define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0)
+
+VNET_DECLARE(struct callout, nd6_timer_ch);
#define V_nd6_timer_ch VNET(nd6_timer_ch)
/* nd6_rtr.c */
@@ -351,15 +353,12 @@ VNET_DECLARE(int, ip6_desync_factor); /* seconds */
VNET_DECLARE(u_int32_t, ip6_temp_preferred_lifetime); /* seconds */
VNET_DECLARE(u_int32_t, ip6_temp_valid_lifetime); /* seconds */
VNET_DECLARE(int, ip6_temp_regen_advance); /* seconds */
-
#define V_nd6_defifindex VNET(nd6_defifindex)
#define V_ip6_desync_factor VNET(ip6_desync_factor)
#define V_ip6_temp_preferred_lifetime VNET(ip6_temp_preferred_lifetime)
#define V_ip6_temp_valid_lifetime VNET(ip6_temp_valid_lifetime)
#define V_ip6_temp_regen_advance VNET(ip6_temp_regen_advance)
-#define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0)
-
union nd_opts {
struct nd_opt_hdr *nd_opt_array[8]; /* max = target address list */
struct {
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index f9061d3..a50925b 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -89,9 +89,8 @@ static void nd6_dad_ns_output(struct dadq *, struct ifaddr *);
static void nd6_dad_ns_input(struct ifaddr *);
static void nd6_dad_na_input(struct ifaddr *);
-VNET_DEFINE(int, dad_ignore_ns);
-VNET_DEFINE(int, dad_maxtry);
-
+VNET_DEFINE(int, dad_ignore_ns) = 0; /* ignore NS in DAD - specwise incorrect*/
+VNET_DEFINE(int, dad_maxtry) = 15; /* max # of *tries* to transmit DAD packet */
#define V_dad_ignore_ns VNET(dad_ignore_ns)
#define V_dad_maxtry VNET(dad_maxtry)
@@ -1124,9 +1123,8 @@ struct dadq {
};
static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq);
+VNET_DEFINE(int, dad_init) = 0;
#define V_dadq VNET(dadq)
-
-VNET_DEFINE(int, dad_init);
#define V_dad_init VNET(dad_init)
static struct dadq *
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 74f4954..19ec989 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -90,14 +90,16 @@ VNET_DECLARE(int, nd6_recalc_reachtm_interval);
#define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval)
static VNET_DEFINE(struct ifnet *, nd6_defifp);
+VNET_DEFINE(int, nd6_defifindex);
#define V_nd6_defifp VNET(nd6_defifp)
-VNET_DEFINE(int, nd6_defifindex);
-VNET_DEFINE(int, ip6_use_tempaddr);
+VNET_DEFINE(int, ip6_use_tempaddr) = 0;
+
VNET_DEFINE(int, ip6_desync_factor);
-VNET_DEFINE(u_int32_t, ip6_temp_preferred_lifetime);
-VNET_DEFINE(u_int32_t, ip6_temp_valid_lifetime);
-VNET_DEFINE(int, ip6_temp_regen_advance);
+VNET_DEFINE(u_int32_t, ip6_temp_preferred_lifetime) = DEF_TEMP_PREFERRED_LIFETIME;
+VNET_DEFINE(u_int32_t, ip6_temp_valid_lifetime) = DEF_TEMP_VALID_LIFETIME;
+
+VNET_DEFINE(int, ip6_temp_regen_advance) = TEMPADDR_REGEN_ADVANCE;
/* RTPREF_MEDIUM has to be 0! */
#define RTPREF_HIGH 1
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 6052b24..939aa6a 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -119,11 +119,11 @@ VNET_DECLARE(struct inpcbinfo, ripcbinfo);
#define V_ripcb VNET(ripcb)
#define V_ripcbinfo VNET(ripcbinfo)
-VNET_DEFINE(struct rip6stat, rip6stat);
-
extern u_long rip_sendspace;
extern u_long rip_recvspace;
+VNET_DEFINE(struct rip6stat, rip6stat);
+
/*
* Hooks for multicast routing. They all default to NULL, so leave them not
* initialized and rely on BSS being set to 0.
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index cced5e30..8189d87 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -50,6 +50,11 @@ __FBSDID("$FreeBSD$");
#include <netinet6/ip6_var.h>
#include <netinet6/scope6_var.h>
+#ifdef ENABLE_DEFAULT_SCOPE
+VNET_DEFINE(int, ip6_use_defzone) = 1;
+#else
+VNET_DEFINE(int, ip6_use_defzone) = 0;
+#endif
/*
* The scope6_lock protects the global sid default stored in
@@ -62,8 +67,6 @@ static struct mtx scope6_lock;
#define SCOPE6_LOCK_ASSERT() mtx_assert(&scope6_lock, MA_OWNED)
static VNET_DEFINE(struct scope6_id, sid_default);
-VNET_DEFINE(int, ip6_use_defzone);
-
#define V_sid_default VNET(sid_default)
#define SID(ifp) \
@@ -73,11 +76,6 @@ void
scope6_init(void)
{
-#ifdef ENABLE_DEFAULT_SCOPE
- V_ip6_use_defzone = 1;
-#else
- V_ip6_use_defzone = 0;
-#endif
bzero(&V_sid_default, sizeof(V_sid_default));
if (!IS_DEFAULT_VNET(curvnet))
OpenPOWER on IntegriCloud