Date: Sat, 8 Sep 2007 18:56:02 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 126195 for review Message-ID: <200709081856.l88Iu2bT078899@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126195 Change 126195 by zec@zec_tpx32 on 2007/09/08 18:55:24 Initialize ip6_maxfrags and ip6_maxfragpackets only in frag6_init(). Initialize rip6_sendspace and rip6_recvspace only in ip6_dom_init(). While here, do random whitespace and duplicate comment cleanups. Affected files ... .. //depot/projects/vimage/src/sys/netinet6/frag6.c#10 edit .. //depot/projects/vimage/src/sys/netinet6/in6_proto.c#20 edit Differences ... ==== //depot/projects/vimage/src/sys/netinet6/frag6.c#10 (text+ko) ==== @@ -107,13 +107,12 @@ INIT_VNET_INET6(curvnet); V_ip6q.ip6q_next = V_ip6q.ip6q_prev = &V_ip6q; - + V_ip6_maxfragpackets = nmbclusters / 4; + V_ip6_maxfrags = nmbclusters / 4; #ifdef VIMAGE if (!IS_DEFAULT_VNET(curvnet)) return; #endif - V_ip6_maxfragpackets = nmbclusters / 4; - V_ip6_maxfrags = nmbclusters / 4; EVENTHANDLER_REGISTER(nmbclusters_change, frag6_change, NULL, EVENTHANDLER_PRI_ANY); ==== //depot/projects/vimage/src/sys/netinet6/in6_proto.c#20 (text+ko) ==== @@ -365,21 +365,21 @@ #endif #ifndef VIMAGE -int ip6_forwarding; /* act as router? */ +int ip6_forwarding; /* act as router? */ int ip6_sendredirects; int ip6_defhlim; int ip6_defmcasthlim; int ip6_accept_rtadv; /* "IPV6FORWARDING ? 0 : 1" is dangerous */ int ip6_maxfragpackets; /* initialized in frag6.c:frag6_init() */ -int ip6_maxfrags; /* initialized in frag6.c:frag6_init() */ +int ip6_maxfrags; /* initialized in frag6.c:frag6_init() */ int ip6_log_interval; int ip6_hdrnestlimit; /* How many header options will we process? */ -int ip6_dad_count; /* DupAddrDetectionTransmits */ +int ip6_dad_count; /* DupAddrDetectionTransmits */ int ip6_auto_flowlabel; int ip6_use_deprecated; /* allow deprecated addr (RFC2462 5.5.4) */ -int ip6_rr_prune; /* router renumbering prefix +int ip6_rr_prune; /* router renumbering prefix * walk list every 5 sec. */ -int ip6_mcast_pmtu; /* enable pMTU discovery for multicast? */ +int ip6_mcast_pmtu; /* enable pMTU discovery for multicast? */ int ip6_v6only; int ip6_keepfaith; @@ -408,13 +408,13 @@ #define RIPV6RCVQ 8192 #ifndef VIMAGE -u_long rip6_sendspace = RIPV6SNDQ; -u_long rip6_recvspace = RIPV6RCVQ; +u_long rip6_sendspace; +u_long rip6_recvspace; /* ICMPV6 parameters */ -int icmp6_rediraccept; /* accept and process redirects */ -int icmp6_redirtimeout; /* 10 minutes */ -int icmp6errppslim; /* 100pps */ +int icmp6_rediraccept; /* accept and process redirects */ +int icmp6_redirtimeout; +int icmp6errppslim; /* control how to respond to NI queries */ int icmp6_nodeinfo; @@ -536,11 +536,11 @@ sysctl_ip6_tempvltime, "I", ""); #else SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPPLTIME, temppltime, - CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_preferred_lifetime, 0, - sysctl_ip6_temppltime, "I", ""); + CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_preferred_lifetime, 0, + sysctl_ip6_temppltime, "I", ""); SYSCTL_OID(_net_inet6_ip6, IPV6CTL_TEMPVLTIME, tempvltime, - CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_valid_lifetime, 0, - sysctl_ip6_tempvltime, "I", ""); + CTLTYPE_INT|CTLFLAG_RW, &ip6_temp_valid_lifetime, 0, + sysctl_ip6_tempvltime, "I", ""); #endif SYSCTL_V_INT(V_NET, vnet_inet6, _net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_RW, ip6_v6only, 0, ""); @@ -595,64 +595,58 @@ { INIT_VNET_INET6(curvnet); - V_ip6_forwarding = IPV6FORWARDING; /* act as router? */ + V_ip6_forwarding = IPV6FORWARDING; V_ip6_sendredirects = IPV6_SENDREDIRECTS; V_ip6_defhlim = IPV6_DEFHLIM; V_ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS; - V_ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */ - V_ip6_maxfragpackets = 0; /* initialized in frag6.c:frag6_init() */ - V_ip6_maxfrags = 0; /* initialized in frag6.c:frag6_init() */ + 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_hdrnestlimit = 15; + V_ip6_dad_count = 1; 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_use_deprecated = 1; + V_ip6_rr_prune = 5; + V_ip6_mcast_pmtu = 0; V_ip6_v6only = 1; - V_ip6_keepfaith = 0; V_ip6_log_time = (time_t)0L; #ifdef IPSTEALTH V_ip6stealth = 0; #endif - V_pmtu_expire = 60*10; V_pmtu_probe = 60*2; - 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 */ + V_icmp6_rediraccept = 1; + 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_sendspace = 9216; /* really max datagram size */ V_udp6_recvspace = 40 * (1024 + sizeof(struct sockaddr_in6)); - /* 40 1K datagrams */ + /* 40 1K datagrams */ } struct domain inet6domain = { - .dom_family = AF_INET6, - .dom_name = "internet6", - .dom_protosw = (struct protosw *)inet6sw, - .dom_protoswNPROTOSW = (struct protosw *) - &inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])], - .dom_rtattach = in6_inithead, + .dom_family = AF_INET6, + .dom_name = "internet6", + .dom_protosw = (struct protosw *)inet6sw, + .dom_protoswNPROTOSW = (struct protosw *) + &inet6sw[sizeof(inet6sw)/sizeof(inet6sw[0])], + .dom_rtattach = in6_inithead, #ifdef VIMAGE - .dom_rtdetach = in6_detachhead, + .dom_rtdetach = in6_detachhead, #endif - .dom_rtoffset = offsetof(struct sockaddr_in6, sin6_addr) << 3, - .dom_maxrtkey = sizeof(struct sockaddr_in6), - .dom_ifattach = in6_domifattach, - .dom_ifdetach = in6_domifdetach, - .dom_init = ip6_dom_init + .dom_rtoffset = offsetof(struct sockaddr_in6, sin6_addr) << 3, + .dom_maxrtkey = sizeof(struct sockaddr_in6), + .dom_ifattach = in6_domifattach, + .dom_ifdetach = in6_domifdetach, + .dom_init = ip6_dom_init }; DOMAIN_SET(inet6);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709081856.l88Iu2bT078899>