Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.127 retrieving revision 1.129.4.1 diff -u -p -r1.127 -r1.129.4.1 --- src/sys/netinet6/ip6_input.c 2009/05/01 03:23:39 1.127 +++ src/sys/netinet6/ip6_input.c 2011/05/31 03:05:08 1.129.4.1 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.127 2009/05/01 03:23:39 martin Exp $ */ +/* $NetBSD: ip6_input.c,v 1.129.4.1 2011/05/31 03:05:08 rmind Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,8 +62,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.127 2009/05/01 03:23:39 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.129.4.1 2011/05/31 03:05:08 rmind Exp $"); +#include "opt_gateway.h" #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" @@ -137,6 +138,8 @@ __KERNEL_RCSID(0, "$NetBSD: ip6_input.c, #include +extern struct inpcbtable tcbtable; /* XXX include of tcp_var.h no good */ + extern struct domain inet6domain; u_char ip6_protox[IPPROTO_MAX]; @@ -161,6 +164,7 @@ static struct m_tag *ip6_setdstifaddr(st static int ip6_hopopts_input(u_int32_t *, u_int32_t *, struct mbuf **, int *); static struct mbuf *ip6_pullexthdr(struct mbuf *, size_t, int); +static void sysctl_net_inet6_ip6_setup(struct sysctllog **); /* * IP6 initialization: fill in IP6 protocol switch table. @@ -172,6 +176,7 @@ ip6_init(void) const struct ip6protosw *pr; int i; + sysctl_net_inet6_ip6_setup(NULL); pr = (const struct ip6protosw *)pffindproto(PF_INET6, IPPROTO_RAW, SOCK_RAW); if (pr == 0) panic("ip6_init"); @@ -1683,7 +1688,8 @@ sysctl_net_inet6_ip6_stats(SYSCTLFN_ARGS return (NETSTAT_SYSCTL(ip6stat_percpu, IP6_NSTATS)); } -SYSCTL_SETUP(sysctl_net_inet6_ip6_setup, "sysctl net.inet6.ip6 subtree setup") +static void +sysctl_net_inet6_ip6_setup(struct sysctllog **clog) { #ifdef RFC2292 #define IS2292(x, y) ((in6p->in6p_flags & IN6P_RFC2292) ? (x) : (y)) @@ -1789,6 +1795,20 @@ SYSCTL_SETUP(sysctl_net_inet6_ip6_setup, IPV6CTL_ACCEPT_RTADV, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, + CTLTYPE_INT, "rtadv_maxroutes", + SYSCTL_DESCR("Maximum number of routes accepted via router advertisements"), + NULL, 0, &ip6_rtadv_maxroutes, 0, + CTL_NET, PF_INET6, IPPROTO_IPV6, + IPV6CTL_RTADV_MAXROUTES, CTL_EOL); + sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_PERMANENT, + CTLTYPE_INT, "rtadv_numroutes", + SYSCTL_DESCR("Current number of routes accepted via router advertisements"), + NULL, 0, &nd6_numroutes, 0, + CTL_NET, PF_INET6, IPPROTO_IPV6, + IPV6CTL_RTADV_NUMROUTES, CTL_EOL); + sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "keepfaith", SYSCTL_DESCR("Activate faith interface"), NULL, 0, &ip6_keepfaith, 0,