[CRIU] [PATCH] net: set the root net ns after restoring all namespaces
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Mar 29 02:38:01 PDT 2017
On 28.03.2017 22:56, Andrei Vagin wrote:
> From: Andrei Vagin <avagin at virtuozzo.com>
>
> Then we will create transport sockets and we want to know where
> they will be created.
>
> Cc: Kirill Tkhai <ktkhai at virtuozzo.com>
> Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
Looks good for me. Thanks.
Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Though, the issue with tun still remains. The patch below for reproduction
diff --git a/test/zdtm/static/tun.c b/test/zdtm/static/tun.c
index c53b8fa8..23b5a1c0 100644
--- a/test/zdtm/static/tun.c
+++ b/test/zdtm/static/tun.c
@@ -1,3 +1,5 @@
+#define _GNU_SOURCE
+#include <sched.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
@@ -119,6 +121,11 @@ int main(int argc, char **argv)
test_init(argc, argv);
+ if (unshare(CLONE_NEWNET) < 0) {
+ pr_perror("unshare");
+ return -1;
+ }
+
/* fd[0] -- opened file */
fds[0] = __open_tun();
if (fds[0] < 0) {
More information about the CRIU
mailing list