From: Tycho Andersen Date: Fri, 6 Nov 2015 19:58:02 +0000 (-0700) Subject: c/r: don't require a veth link to c/r X-Git-Tag: lxc-2.0.0.beta1~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1fd648dd85fd254e31bb8d3503cb6b7009cfcfc;p=thirdparty%2Flxc.git c/r: don't require a veth link to c/r veths can be unconnected in the container's config, and we should handle this case. Signed-off-by: Tycho Andersen Acked-by: Stéphane Graber --- diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 798036a95..7ee6cbea2 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;