Date: Mon, 15 Sep 2014 15:11:02 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r271610 - in head: etc/rc.d sys/netinet Message-ID: <20140915111102.GS60617@FreeBSD.org> In-Reply-To: <201409150720.s8F7KeJW018298@svn.freebsd.org> References: <201409150720.s8F7KeJW018298@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hiroki, On Mon, Sep 15, 2014 at 07:20:40AM +0000, Hiroki Sato wrote: H> Modified: head/sys/netinet/ip_options.c H> ============================================================================== H> --- head/sys/netinet/ip_options.c Mon Sep 15 06:21:28 2014 (r271609) H> +++ head/sys/netinet/ip_options.c Mon Sep 15 07:20:40 2014 (r271610) H> @@ -65,18 +65,21 @@ __FBSDID("$FreeBSD$"); H> H> #include <sys/socketvar.h> H> H> -static int ip_dosourceroute = 0; H> -SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, H> - &ip_dosourceroute, 0, "Enable forwarding source routed IP packets"); H> - H> -static int ip_acceptsourceroute = 0; H> -SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, H> - CTLFLAG_RW, &ip_acceptsourceroute, 0, H> +static VNET_DEFINE(int, ip_dosourceroute); H> +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, H> + &VNET_NAME(ip_dosourceroute), 0, H> + "Enable forwarding source routed IP packets"); H> +#define V_ip_dosourceroute VNET(ip_dosourceroute) H> + H> +static VNET_DEFINE(int, ip_acceptsourceroute); H> +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, H> + CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, H> "Enable accepting source routed IP packets"); H> +#define V_ip_acceptsourceroute VNET(ip_acceptsourceroute) H> H> -int ip_doopts = 1; /* 0 = ignore, 1 = process, 2 = reject */ H> -SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, H> - &ip_doopts, 0, "Enable IP options processing ([LS]SRR, RR, TS)"); H> +VNET_DEFINE(int, ip_doopts) = 1; /* 0 = ignore, 1 = process, 2 = reject */ H> +SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, H> + &VNET_NAME(ip_doopts), 0, "Enable IP options processing ([LS]SRR, RR, TS)"); Since r261590 one doesn't need SYSCTL_VNET_* macros. You can simply add CTLFLAG_VNET to the generic SYSCTL_* macro. I kept old macros due to big amount of code using it, and I was lazy to convert it. But new code shouldn't be added. -- Totus tuus, Glebius.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140915111102.GS60617>