mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 05:18:00 +00:00
net: rename pid into nsid for prepare_net_ns()
PID ussualy means processs ID, but prepare_net_ns works with namespaces. travis-ci: success for Dump and restore nested network namespaces (rev4) Signed-off-by: Andrei Vagin <avagin@virtuozzo.com> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
0725a3e4c2
commit
4a48a5d68a
18
criu/net.c
18
criu/net.c
@ -1902,32 +1902,32 @@ int dump_net_ns(int ns_id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int prepare_net_ns(int pid)
|
||||
int prepare_net_ns(int nsid)
|
||||
{
|
||||
int ret = 0;
|
||||
NetnsEntry *netns = NULL;
|
||||
|
||||
if (!(opts.empty_ns & CLONE_NEWNET)) {
|
||||
ret = restore_netns_conf(pid, &netns);
|
||||
ret = restore_netns_conf(nsid, &netns);
|
||||
if (!ret)
|
||||
ret = restore_links(pid, &netns);
|
||||
ret = restore_links(nsid, &netns);
|
||||
if (netns)
|
||||
netns_entry__free_unpacked(netns, NULL);
|
||||
|
||||
if (!ret)
|
||||
ret = restore_ifaddr(pid);
|
||||
ret = restore_ifaddr(nsid);
|
||||
if (!ret)
|
||||
ret = restore_route(pid);
|
||||
ret = restore_route(nsid);
|
||||
if (!ret)
|
||||
ret = restore_rule(pid);
|
||||
ret = restore_rule(nsid);
|
||||
if (!ret)
|
||||
ret = restore_iptables(pid);
|
||||
ret = restore_iptables(nsid);
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
ret = restore_nf_ct(pid, CR_FD_NETNF_CT);
|
||||
ret = restore_nf_ct(nsid, CR_FD_NETNF_CT);
|
||||
if (!ret)
|
||||
ret = restore_nf_ct(pid, CR_FD_NETNF_EXP);
|
||||
ret = restore_nf_ct(nsid, CR_FD_NETNF_EXP);
|
||||
|
||||
close_service_fd(NS_FD_OFF);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user