From owner-svn-src-head@FreeBSD.ORG Mon Sep 15 11:11:05 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DC2C502; Mon, 15 Sep 2014 11:11:05 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CCDB1C6; Mon, 15 Sep 2014 11:11:04 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s8FBB2AT076733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Sep 2014 15:11:02 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s8FBB2Xe076732; Mon, 15 Sep 2014 15:11:02 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 15 Sep 2014 15:11:02 +0400 From: Gleb Smirnoff To: Hiroki Sato Subject: Re: svn commit: r271610 - in head: etc/rc.d sys/netinet Message-ID: <20140915111102.GS60617@FreeBSD.org> References: <201409150720.s8F7KeJW018298@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409150720.s8F7KeJW018298@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 11:11:05 -0000 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 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.