Re: [PATCH] Skip down interfaces (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Dan Smith (danms@xxxxxxxxxx):
> This makes the netns checkpoint code skip interfaces that are not up.
> Later, we want to make it possible to checkpoint down interfaces with
> a flag, but for now this helps prevent people from getting stuck on
> stock kernels with various unsupported and persistent virtual interfaces,
> such as tunnel devices.
> 
> Changes in v2:
>  - Fix logic to only skip down interfaces if they're not supported
> 
> Signed-off-by: Dan Smith <danms@xxxxxxxxxx>
> Acked-by: Serge Hallyn <serue@xxxxxxxxxx>

Looks good, thanks.

Tested-by: Serge Hallyn <serue@xxxxxxxxxx>

-serge

> ---
>  net/checkpoint_dev.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/net/checkpoint_dev.c b/net/checkpoint_dev.c
> index bc0415d..e8d574c 100644
> --- a/net/checkpoint_dev.c
> +++ b/net/checkpoint_dev.c
> @@ -268,7 +268,16 @@ int checkpoint_netns(struct ckpt_ctx *ctx, void *ptr)
>  		goto out;
> 
>  	for_each_netdev(net, dev) {
> -		ret = checkpoint_obj(ctx, dev, CKPT_OBJ_NETDEV);
> +		if (dev->netdev_ops->ndo_checkpoint)
> +			ret = checkpoint_obj(ctx, dev, CKPT_OBJ_NETDEV);
> +		else if (dev->flags & IFF_UP)
> +			ret = -ENOSYS;
> +		else
> +			/* TODO: There should be a flag to attempt a
> +			 * checkpoint of downed interfaces, regardless
> +			 * of whether they support checkpoint or not.
> +			 */
> +			ret = 0;
>  		if (ret < 0)
>  			break;
>  	}
> -- 
> 1.6.2.5
> 
> _______________________________________________
> Containers mailing list
> Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux