Date: Mon, 15 Sep 2014 23:44:16 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: glebius@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: <20140915.234416.291650200211280840.hrs@allbsd.org> In-Reply-To: <20140915111102.GS60617@FreeBSD.org> References: <201409150720.s8F7KeJW018298@svn.freebsd.org> <20140915111102.GS60617@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Mon_Sep_15_23_44_16_2014_221)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gleb Smirnoff <glebius@FreeBSD.org> wrote in <20140915111102.GS60617@FreeBSD.org>: gl> Hiroki, gl> gl> On Mon, Sep 15, 2014 at 07:20:40AM +0000, Hiroki Sato wrote: gl> H> Modified: head/sys/netinet/ip_options.c gl> H> ============================================================================== gl> H> --- head/sys/netinet/ip_options.c Mon Sep 15 06:21:28 2014 (r271609) gl> H> +++ head/sys/netinet/ip_options.c Mon Sep 15 07:20:40 2014 (r271610) gl> H> @@ -65,18 +65,21 @@ __FBSDID("$FreeBSD$"); gl> H> gl> H> #include <sys/socketvar.h> gl> H> gl> H> -static int ip_dosourceroute = 0; gl> H> -SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, gl> H> - &ip_dosourceroute, 0, "Enable forwarding source routed IP packets"); gl> H> - gl> H> -static int ip_acceptsourceroute = 0; gl> H> -SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, gl> H> - CTLFLAG_RW, &ip_acceptsourceroute, 0, gl> H> +static VNET_DEFINE(int, ip_dosourceroute); gl> H> +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, gl> H> + &VNET_NAME(ip_dosourceroute), 0, gl> H> + "Enable forwarding source routed IP packets"); gl> H> +#define V_ip_dosourceroute VNET(ip_dosourceroute) gl> H> + gl> H> +static VNET_DEFINE(int, ip_acceptsourceroute); gl> H> +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, gl> H> + CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, gl> H> "Enable accepting source routed IP packets"); gl> H> +#define V_ip_acceptsourceroute VNET(ip_acceptsourceroute) gl> H> gl> H> -int ip_doopts = 1; /* 0 = ignore, 1 = process, 2 = reject */ gl> H> -SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, gl> H> - &ip_doopts, 0, "Enable IP options processing ([LS]SRR, RR, TS)"); gl> H> +VNET_DEFINE(int, ip_doopts) = 1; /* 0 = ignore, 1 = process, 2 = reject */ gl> H> +SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, gl> H> + &VNET_NAME(ip_doopts), 0, "Enable IP options processing ([LS]SRR, RR, TS)"); gl> gl> Since r261590 one doesn't need SYSCTL_VNET_* macros. You can simply add gl> CTLFLAG_VNET to the generic SYSCTL_* macro. gl> gl> I kept old macros due to big amount of code using it, and I was lazy gl> to convert it. But new code shouldn't be added. Ah, okay, thank you for pointing out it. Fixed in r271628. -- Hiroki ----Security_Multipart(Mon_Sep_15_23_44_16_2014_221)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQW+0AACgkQTyzT2CeTzy0XNwCcDWvPyk+baAahx5hlyP5vWzbP CHQAn33IgorWUj5zc2KXD4nFKjpDXeqz =3S1m -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Sep_15_23_44_16_2014_221)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140915.234416.291650200211280840.hrs>