svn commit: r271610 - in head: etc/rc.d sys/netinet

Hiroki Sato hrs at FreeBSD.org
Mon Sep 15 14:45:47 UTC 2014


Gleb Smirnoff <glebius at FreeBSD.org> wrote
  in <20140915111102.GS60617 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20140915/6e2efa7e/attachment.sig>


More information about the svn-src-head mailing list