2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

tun: Restore tun files and tun links

This thing is pretty straightforward -- on netns creation
populate it with tun-s, after this collect tun files, open
and attach them with regular fd-s engine.

One tricky thing -- when populating namespace with tun links
make them all persistent and drop this flag (if required)
later, when the first alive opened appears.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-08-23 19:10:15 +04:00
parent a3e53658f7
commit 1ac6d76cbd
4 changed files with 176 additions and 0 deletions

View File

@@ -62,6 +62,7 @@
#include "sysctl.h"
#include "vdso.h"
#include "stats.h"
#include "tun.h"
#include "protobuf.h"
#include "protobuf/sa.pb-c.h"
@@ -129,6 +130,7 @@ static struct collect_image_info *cinfos[] = {
&fanotify_mark_cinfo,
&tty_info_cinfo,
&tty_cinfo,
&tunfile_cinfo,
};
static int root_prepare_shared(void)