PERFORCE change 152206 for review
Marko Zec
zec at FreeBSD.org
Thu Oct 30 05:53:47 PDT 2008
http://perforce.freebsd.org/chv.cgi?CH=152206
Change 152206 by zec at zec_tpx32 on 2008/10/30 12:53:25
Rearrange V_ variable initialization for gif(4).
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/net/if_gif.c#11 edit
.. //depot/projects/vimage-commit2/src/sys/netgraph/netgraph.h#13 edit
.. //depot/projects/vimage-commit2/src/sys/netinet/in_gif.c#9 edit
.. //depot/projects/vimage-commit2/src/sys/netinet6/in6_proto.c#10 edit
Differences ...
==== //depot/projects/vimage-commit2/src/sys/net/if_gif.c#11 (text+ko) ====
@@ -94,7 +94,18 @@
*/
static struct mtx gif_mtx;
static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface");
+
+#ifdef VIMAGE_GLOBALS
static LIST_HEAD(, gif_softc) gif_softc_list;
+static int max_gif_nesting;
+static int parallel_tunnels;
+#ifdef INET
+int ip_gif_ttl;
+#endif
+#ifdef INET6
+int ip6_gif_hlim;
+#endif
+#endif
void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af);
void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af);
@@ -123,9 +134,6 @@
*/
#define MAX_GIF_NEST 1
#endif
-#ifndef VIMAGE
-static int max_gif_nesting = MAX_GIF_NEST;
-#endif
SYSCTL_V_INT(V_NET, vnet_gif, _net_link_gif, OID_AUTO, max_nesting,
CTLFLAG_RW, max_gif_nesting, 0, "Max nested tunnels");
@@ -140,11 +148,6 @@
* pair of addresses. Some applications require this functionality so
* we allow control over this check here.
*/
-#ifdef XBONEHACK
-static int parallel_tunnels = 1;
-#else
-static int parallel_tunnels = 0;
-#endif
SYSCTL_V_INT(V_NET, vnet_gif, _net_link_gif, OID_AUTO, parallel_tunnels,
CTLFLAG_RW, parallel_tunnels, 0, "Allow parallel tunnels?");
@@ -249,12 +252,21 @@
switch (type) {
case MOD_LOAD:
mtx_init(&gif_mtx, "gif_mtx", NULL, MTX_DEF);
+
LIST_INIT(&V_gif_softc_list);
- if_clone_attach(&gif_cloner);
-
+ V_max_gif_nesting = MAX_GIF_NEST;
+#ifdef XBONEHACK
+ V_parallel_tunnels = 1;
+#else
+ V_parallel_tunnels = 0;
+#endif
+#ifdef INET
+ V_ip_gif_ttl = GIF_TTL;
+#endif
#ifdef INET6
V_ip6_gif_hlim = GIF_HLIM;
#endif
+ if_clone_attach(&gif_cloner);
break;
case MOD_UNLOAD:
==== //depot/projects/vimage-commit2/src/sys/netgraph/netgraph.h#13 (text+ko) ====
==== //depot/projects/vimage-commit2/src/sys/netinet/in_gif.c#9 (text+ko) ====
@@ -85,7 +85,9 @@
.pr_usrreqs = &rip_usrreqs
};
-static int ip_gif_ttl = GIF_TTL;
+#ifdef VIMAGE_GLOBALS
+extern int ip_gif_ttl;
+#endif
SYSCTL_V_INT(V_NET, vnet_gif, _net_inet_ip, IPCTL_GIF_TTL, gifttl,
CTLFLAG_RW, ip_gif_ttl, 0, "");
==== //depot/projects/vimage-commit2/src/sys/netinet6/in6_proto.c#10 (text+ko) ====
@@ -390,8 +390,6 @@
int nd6_onlink_ns_rfc4861;
#endif
-int ip6_gif_hlim = 0;
-
#ifdef VIMAGE_GLOBALS
/* icmp6 */
/*
More information about the p4-projects
mailing list