Hi all,
As noted in a previous thread, I set out to better document the net.inet6 sysctls after having to tweak the knobs to get things to work for TAHI, and this is the resulting draft (so far). I also took the liberty of removing the ip6_rr_prune and icmp6_redirtimeout sysctls because they weren't in use anywhere else in the sys/... portion of the tree. I was wondering if there are any points that should be corrected/clarified before I submit a PR with the resulting patch.
Thanks!
-Garrett

Index: sys/netinet6/in6_proto.c
===================================================================
--- sys/netinet6/in6_proto.c    (revision 242903)
+++ sys/netinet6/in6_proto.c    (working copy)
@@ -409,8 +409,6 @@
 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;

@@ -443,7 +441,6 @@

 /* ICMPV6 parameters */
 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) =
@@ -515,15 +512,20 @@
 }

 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_FORWARDING, forwarding, CTLFLAG_RW,
-       &VNET_NAME(ip6_forwarding), 0, "");
+       &VNET_NAME(ip6_forwarding), 0,
+       "Forward IPv6 packets via node.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
-       &VNET_NAME(ip6_sendredirects), 0, "");
+       &VNET_NAME(ip6_sendredirects), 0,
+       "Redirect IPv6 packets via node.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_RW,
-       &VNET_NAME(ip6_defhlim), 0, "");
+       &VNET_NAME(ip6_defhlim), 0,
+       "Default hop limit for IPv6 unicast packets.");
 SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RW,
-       &VNET_NAME(ip6stat), ip6stat, "");
+       &VNET_NAME(ip6stat), ip6stat,
+       "IPv6 statistics.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets,
-       CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0,
+       "Maximum number of fragmented packets to process.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv,
        CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0,
        "Default value of per-interface flag for accepting ICMPv6 Router"
@@ -535,57 +537,74 @@
        "default router list.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_NORBIT_RAIF, norbit_raif, CTLFLAG_RW,
        &VNET_NAME(ip6_norbit_raif), 0,
-       "Always set 0 to R flag in ICMPv6 NA messages when accepting RA"
-       " on the interface.");
+       "Always set 0 to R flag in ICMPv6 NA messages when accepting RA "
+       "on the interface.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RFC6204W3, rfc6204w3,
        CTLFLAG_RW, &VNET_NAME(ip6_rfc6204w3), 0,
        "Accept the default router list from ICMPv6 RA messages even "
        "when packet forwarding enabled.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_KEEPFAITH, keepfaith, CTLFLAG_RW,
-       &VNET_NAME(ip6_keepfaith), 0, "");
+       &VNET_NAME(ip6_keepfaith), 0,
+       "");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_LOG_INTERVAL, log_interval,
-       CTLFLAG_RW, &VNET_NAME(ip6_log_interval), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_log_interval), 0,
+       "Period for throttling logging for high-traffic IPv6 operations (in "
+       "seconds).");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_HDRNESTLIMIT, hdrnestlimit,
-       CTLFLAG_RW, &VNET_NAME(ip6_hdrnestlimit), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_hdrnestlimit), 0,
+       "Maximum number of nested header options to process.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DAD_COUNT, dad_count, CTLFLAG_RW,
-       &VNET_NAME(ip6_dad_count), 0, "");
+       &VNET_NAME(ip6_dad_count), 0,
+       "Number of Duplicate Address Detection attempts to try before "
+       "disabling interface.  Setting the value to 0 disables DAD.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_AUTO_FLOWLABEL, auto_flowlabel,
-       CTLFLAG_RW, &VNET_NAME(ip6_auto_flowlabel), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_auto_flowlabel), 0,
+       "Automatically attach a flowlabel to IPv6 packets.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DEFMCASTHLIM, defmcasthlim,
-       CTLFLAG_RW, &VNET_NAME(ip6_defmcasthlim), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_defmcasthlim), 0,
+       "Default hop limit for IPv6 multicast packets.");
 SYSCTL_STRING(_net_inet6_ip6, IPV6CTL_KAME_VERSION, kame_version,
        CTLFLAG_RD, __KAME_VERSION, 0, "");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_USE_DEPRECATED, use_deprecated,
-       CTLFLAG_RW, &VNET_NAME(ip6_use_deprecated), 0, "");
-SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RR_PRUNE, rr_prune, CTLFLAG_RW,
-       &VNET_NAME(ip6_rr_prune), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_use_deprecated), 0,
+       "Use deprecated IPv6 support.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_USETEMPADDR, use_tempaddr,
-       CTLFLAG_RW, &VNET_NAME(ip6_use_tempaddr), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_use_tempaddr), 0,
+       "Use a temporary address when establishing address via SLAAC.");
 SYSCTL_VNET_PROC(_net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime,
        CTLTYPE_INT|CTLFLAG_RW, &VNET_NAME(ip6_temp_preferred_lifetime), 0,
-       sysctl_ip6_temppltime, "I", "");
+       sysctl_ip6_temppltime, "I",
+       "Preferred lifetime (in seconds) for a temporary address");
 SYSCTL_VNET_PROC(_net_inet6_ip6, IPV6CTL_TEMPVLTIME, tempvltime,
        CTLTYPE_INT|CTLFLAG_RW, &VNET_NAME(ip6_temp_valid_lifetime), 0,
-       sysctl_ip6_tempvltime, "I", "");
+       sysctl_ip6_tempvltime, "I",
+       "Valid lifetime (in seconds) for a temporary address.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only,        CTLFLAG_RW,
-       &VNET_NAME(ip6_v6only), 0, "");
+       &VNET_NAME(ip6_v6only), 0,
+       "Allow IPv4-mapped IPv6 addresses per RFC 3493.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal,
        CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0,
        "Default value of per-interface flag for automatically adding an IPv6"
        " link-local address to interfaces when attached");
 SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RW,
-       &VNET_NAME(rip6stat), rip6stat, "");
+       &VNET_NAME(rip6stat), rip6stat,
+       "RIP6 statistics.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR, prefer_tempaddr,
-       CTLFLAG_RW, &VNET_NAME(ip6_prefer_tempaddr), 0, "");
+       CTLFLAG_RW, &VNET_NAME(ip6_prefer_tempaddr), 0,
+       "Prefer the temporary address assigned when performing NUD.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_USE_DEFAULTZONE, use_defaultzone,
-       CTLFLAG_RW, &VNET_NAME(ip6_use_defzone), 0,"");
+       CTLFLAG_RW, &VNET_NAME(ip6_use_defzone), 0,
+       "Use the default scope zone if not explicitly provided.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, maxfrags, CTLFLAG_RW,
-       &VNET_NAME(ip6_maxfrags), 0, "");
+       &VNET_NAME(ip6_maxfrags), 0,
+       "Maximum number of fragments to hold in the reassembly queue.");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_MCAST_PMTU, mcast_pmtu, CTLFLAG_RW,
-       &VNET_NAME(ip6_mcast_pmtu), 0, "");
+       &VNET_NAME(ip6_mcast_pmtu), 0,
+       "Enable multicast pMTU discovery.");
 #ifdef IPSTEALTH
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_STEALTH, stealth, CTLFLAG_RW,
-       &VNET_NAME(ip6stealth), 0, "");
+       &VNET_NAME(ip6stealth), 0,
+       "IPv6 stealth mode. No hop limit decrementation on forwarding.");
 #endif

 #ifdef FLOWTABLE
@@ -594,35 +613,45 @@
 #define        V_ip6_output_flowtable_size     VNET(ip6_output_flowtable_size)

 SYSCTL_VNET_INT(_net_inet6_ip6, OID_AUTO, output_flowtable_size, CTLFLAG_RDTUN,
-    &VNET_NAME(ip6_output_flowtable_size), 2048,
-    "number of entries in the per-cpu output flow caches");
+       &VNET_NAME(ip6_output_flowtable_size), 2048,
+       "number of entries in the per-cpu output flow caches");
 #endif

 /* net.inet6.icmp6 */
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRACCEPT, rediraccept,
-       CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, "");
-SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, redirtimeout,
-       CTLFLAG_RW, &VNET_NAME(icmp6_redirtimeout), 0, "");
+       CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0,
+       "Accept and process router redirects.");
 SYSCTL_VNET_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RW,
-       &VNET_NAME(icmp6stat), icmp6stat, "");
+       &VNET_NAME(icmp6stat), icmp6stat,
+       "ICMPv6 statistics.");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, nd6_prune, CTLFLAG_RW,
-       &VNET_NAME(nd6_prune), 0, "");
+       &VNET_NAME(nd6_prune), 0,
+       "Period (in seconds) for performing nd6 expiration checks of default "
+       "routes and prefix lists");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY, nd6_delay, CTLFLAG_RW,
-       &VNET_NAME(nd6_delay), 0, "");
+       &VNET_NAME(nd6_delay), 0,
+       "Delay (in seconds) before performing NUD on stale nodes.");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_UMAXTRIES, nd6_umaxtries,
-       CTLFLAG_RW, &VNET_NAME(nd6_umaxtries), 0, "");
+       CTLFLAG_RW, &VNET_NAME(nd6_umaxtries), 0,
+       "Maximum number of unicast queries to perform via nd6.");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MMAXTRIES, nd6_mmaxtries,
-       CTLFLAG_RW, &VNET_NAME(nd6_mmaxtries), 0, "");
+       CTLFLAG_RW, &VNET_NAME(nd6_mmaxtries), 0,
+       "Maximum number of multicast queries to perform via nd6.");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_USELOOPBACK, nd6_useloopback,
-       CTLFLAG_RW, &VNET_NAME(nd6_useloopback), 0, "");
+       CTLFLAG_RW, &VNET_NAME(nd6_useloopback), 0,
+       "Use loopback interface for local traffic");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_NODEINFO, nodeinfo, CTLFLAG_RW,
-       &VNET_NAME(icmp6_nodeinfo), 0, "");
+       &VNET_NAME(icmp6_nodeinfo), 0,
+       "Node information state.");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ERRPPSLIMIT, errppslimit,
-       CTLFLAG_RW, &VNET_NAME(icmp6errppslim), 0, "");
+       CTLFLAG_RW, &VNET_NAME(icmp6errppslim), 0,
+       "Packets per second limit for ICMPv6 queries.");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_MAXNUDHINT, nd6_maxnudhint,
-       CTLFLAG_RW, &VNET_NAME(nd6_maxnudhint), 0, "");
+       CTLFLAG_RW, &VNET_NAME(nd6_maxnudhint), 0,
+       "Maximum number of upper layer hints.");
 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.");
+       nd6_onlink_ns_rfc4861,
+       CTLFLAG_RW, &VNET_NAME(nd6_onlink_ns_rfc4861), 0,
+       "Accept 'on-link' nd6 NS in compliance with RFC 4861.");
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to