[lxc-devel] [PATCH] c/r: don't require a veth link to c/r

Stéphane Graber stgraber at ubuntu.com
Fri Nov 6 20:02:14 UTC 2015


On Fri, Nov 06, 2015 at 12:58:02PM -0700, Tycho Andersen wrote:
> veths can be unconnected in the container's config, and we should handle
> this case.
> 
> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
>  src/lxc/criu.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/lxc/criu.c b/src/lxc/criu.c
> index 798036a..7ee6cbe 100644
> --- a/src/lxc/criu.c
> +++ b/src/lxc/criu.c
> @@ -178,7 +178,10 @@ void exec_criu(struct criu_opts *opts)
>  
>  			veth = n->priv.veth_attr.pair;
>  
> -			ret = snprintf(buf, sizeof(buf), "%s=%s@%s", eth, veth, n->link);
> +			if (n->link)
> +				ret = snprintf(buf, sizeof(buf), "%s=%s@%s", eth, veth, n->link);
> +			else
> +				ret = snprintf(buf, sizeof(buf), "%s=%s", eth, veth);
>  			if (ret < 0 || ret >= sizeof(buf))
>  				goto err;
>  
> -- 
> 2.6.2
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20151106/aefa4422/attachment.sig>


More information about the lxc-devel mailing list