mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-06 17:18:10 +00:00
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 <tycho.andersen@canonical.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
93525c00c7
commit
c1fd648dd8
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user