mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 11:13:50 +00:00
lxc_unshare: fix network device handling
We were passing the wrong PID. Fix this! Link: https://discuss.linuxcontainers.org/t/problem-with-moving-interface-new-network-namespace-in-lxc-unshare Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
ecd92dffbc
commit
a1ac26802c
@ -416,7 +416,7 @@ int main(int argc, char *argv[])
|
||||
if (lpid == 0) {
|
||||
char buf[256];
|
||||
|
||||
ret = snprintf(buf, 256, "%d", lpid);
|
||||
ret = snprintf(buf, 256, "%d", pid);
|
||||
if (ret < 0 || ret >= 256)
|
||||
_exit(EXIT_FAILURE);
|
||||
|
||||
@ -425,8 +425,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (wait_for_pid(lpid) != 0)
|
||||
SYSERROR("Could not move interface \"%s\" into container %d",
|
||||
ifname, lpid);
|
||||
SYSERROR("Could not move interface \"%s\" into container %d", ifname, lpid);
|
||||
}
|
||||
|
||||
free_ifname_list();
|
||||
|
Loading…
Reference in New Issue
Block a user