mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
parasite: Precreate daemon control sockets
Now we have netns on pstree-item and have the place where to pre-create daemon socket in needed namespace. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
8
net.c
8
net.c
@@ -652,6 +652,12 @@ static int prep_ns_sockets(struct ns_id *ns)
|
||||
goto err_nl;
|
||||
}
|
||||
|
||||
ret = ns->net.seqsk = socket(PF_UNIX, SOCK_SEQPACKET, 0);
|
||||
if (ret < 0) {
|
||||
pr_perror("Can't create seqsk for parasite");
|
||||
goto err_sq;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
out:
|
||||
if (nsret >= 0 && restore_ns(nsret, &net_ns_desc) < 0) {
|
||||
@@ -663,6 +669,8 @@ out:
|
||||
return ret;
|
||||
|
||||
err_ret:
|
||||
close(ns->net.seqsk);
|
||||
err_sq:
|
||||
close(ns->net.nlsk);
|
||||
err_nl:
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user