[CRIU] [PATCH] net: ipv4: add ignore_routes_with_linkdown sysctl

Pavel Emelyanov xemul at parallels.com
Thu Nov 5 02:49:49 PST 2015


On 11/05/2015 09:21 AM, Tycho Andersen wrote:
> Looks like this is new as of the 4.2 timeframe. It does bring up a
> question: should we do a ls /proc/sys/net/conf/lo on the host to figure out
> what sysctls to try and dump instead of use this hardcoded list? I guess we
> need to check file modes too, because of mc_forwarding, but something like
> that.
> 
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
>  net.c                             | 1 +
>  test/zdtm/live/static/netns-dev.c | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/net.c b/net.c
> index 082ccb6..6d3f98e 100644
> --- a/net.c
> +++ b/net.c
> @@ -67,6 +67,7 @@ static char *devconfs[] = {
>  	"forwarding",
>  	"igmpv2_unsolicited_report_interval",
>  	"igmpv3_unsolicited_report_interval",
> +	"ignore_routes_with_linkdown",

This would break restore from older images -- criu just walks the array of
integers found int the image and puts the values into sysctls with names
found in this table. So once new thing appears in the middle the whole loop
starts writing data into wrong places :)

>  	"log_martians",
>  	"medium_id",
>  	"promote_secondaries",
> diff --git a/test/zdtm/live/static/netns-dev.c b/test/zdtm/live/static/netns-dev.c
> index 4d7fede..488b280 100644
> --- a/test/zdtm/live/static/netns-dev.c
> +++ b/test/zdtm/live/static/netns-dev.c
> @@ -25,6 +25,7 @@ char *devconfs[] = {
>  	"forwarding",
>  	"igmpv2_unsolicited_report_interval",
>  	"igmpv3_unsolicited_report_interval",
> +	"ignore_routes_with_linkdown",
>  	"log_martians",
>  	"mc_forwarding",
>  	"medium_id",
> @@ -57,6 +58,7 @@ int rand_limit[] = {
>  	2,	/* forwarding */
>  	0,	/* igmpv2_unsolicited_report_interval */
>  	0,	/* igmpv3_unsolicited_report_interval */
> +	2,	/* ignore_routes_with_linkdown */
>  	2,	/* log_martians */
>  	2,	/* mc_forwarding */
>  	0,	/* medium_id */
> 



More information about the CRIU mailing list