From owner-svn-src-head@FreeBSD.ORG Mon Sep 15 14:45:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC3B91AF; Mon, 15 Sep 2014 14:45:46 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 701E1C27; Mon, 15 Sep 2014 14:45:46 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s8FEjJm0072221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Sep 2014 23:45:30 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s8FEjIW5024105; Mon, 15 Sep 2014 23:45:19 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 15 Sep 2014 23:44:16 +0900 (JST) Message-Id: <20140915.234416.291650200211280840.hrs@allbsd.org> To: glebius@FreeBSD.org Subject: Re: svn commit: r271610 - in head: etc/rc.d sys/netinet From: Hiroki Sato In-Reply-To: <20140915111102.GS60617@FreeBSD.org> References: <201409150720.s8F7KeJW018298@svn.freebsd.org> <20140915111102.GS60617@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Sep_15_23_44_16_2014_221)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Mon, 15 Sep 2014 23:45:39 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 14:45:47 -0000 ----Security_Multipart(Mon_Sep_15_23_44_16_2014_221)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Gleb Smirnoff 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 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)----