Re: [PATCH] Temporary IPv6 address asignment

From: Eric W. Biederman
Date: Sun May 03 2009 - 19:58:24 EST


Lukasz Stelmach <stlman@xxxxxxxxx> writes:

I don't know about the rest of your patch the sysctl hunks are wrong.

> diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
> index e76d3b2..951ba2c 100644
> --- a/include/linux/sysctl.h
> +++ b/include/linux/sysctl.h
> @@ -570,15 +570,16 @@ enum {
> NET_IPV6_TEMP_PREFERED_LFT=13,
> NET_IPV6_REGEN_MAX_RETRY=14,
> NET_IPV6_MAX_DESYNC_FACTOR=15,
> - NET_IPV6_MAX_ADDRESSES=16,
> - NET_IPV6_FORCE_MLD_VERSION=17,
> - NET_IPV6_ACCEPT_RA_DEFRTR=18,
> - NET_IPV6_ACCEPT_RA_PINFO=19,
> - NET_IPV6_ACCEPT_RA_RTR_PREF=20,
> - NET_IPV6_RTR_PROBE_INTERVAL=21,
> - NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
> - NET_IPV6_PROXY_NDP=23,
> - NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
> + NET_IPV6_DESYNC_FACTOR=16,
> + NET_IPV6_MAX_ADDRESSES=17,
> + NET_IPV6_FORCE_MLD_VERSION=18,
> + NET_IPV6_ACCEPT_RA_DEFRTR=19,
> + NET_IPV6_ACCEPT_RA_PINFO=20,
> + NET_IPV6_ACCEPT_RA_RTR_PREF=21,
> + NET_IPV6_RTR_PROBE_INTERVAL=22,
> + NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=23,
> + NET_IPV6_PROXY_NDP=24,
> + NET_IPV6_ACCEPT_SOURCE_ROUTE=26,
> __NET_IPV6_MAX
> };

These are numbers used in the kernel sysctl binary ABI. You just
changed them breaking the ABI, when you put NET_IPV6_DESYNC_FACTOR in
the middle.

> @@ -4124,6 +4167,14 @@ static struct addrconf_sysctl_table
> .data = &ipv6_devconf.max_desync_factor,
> .maxlen = sizeof(int),
> .mode = 0644,
> + .proc_handler = addrconf_sysctl_desync,
> + },
> + {
> + .ctl_name = NET_IPV6_DESYNC_FACTOR,
> + .procname = "desync_factor",
> + .data = &ipv6_devconf.desync_factor,
> + .maxlen = sizeof(int),
> + .mode = 0444,
> .proc_handler = proc_dointvec,
},

The sysctl binary abi is currently frozen and deprecated. Which means
you should set .ctl_name = CTL_UNNUMBERED or simply omit ctl_name on
new sysctl entries.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/