2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 12:57:57 +00:00

12 Commits

Author SHA1 Message Date
Andrey Vagin
4850fd94a8 crtools: move cr_options in a separate header
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-06 18:17:52 +04:00
Andrey Vagin
1300cf4915 crtools: move all stuff about fdset in a separate header
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-06 15:24:48 +04:00
Pavel Emelyanov
37b94082c7 tun: Use shorter name for ifr_name
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-10 12:01:28 +04:00
Cyrill Gorcunov
9959a2a963 tun: Fix redundant \n in pr_perror
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-02 16:19:12 +04:00
Pavel Emelyanov
1943d08c38 tun: Don't dump tun file if we're not taking netns with us
Tun files are attached to tun links, thus we need the latter to
be dumped together with the former.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-28 19:41:21 +04:00
Cyrill Gorcunov
369f366a36 tun: Use safe stlcpy instead of strcpy
Reading from NetDeviceEntry directly is not safe
and may cause buffer overflow. Use stlcpy helper.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-28 19:06:51 +04:00
Cyrill Gorcunov
aaeff46e52 tun: Check for xmalloc error
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-28 17:20:44 +04:00
Pavel Emelyanov
b18fb09eb9 show: Replace one-line show_foo calls with args array
We have generic do_pb_show() call and tons of show_foo
routines, that just call one with proper args. Compact
the code by putting the args into array and calling
the do_pb_show() in one place.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-24 04:00:32 +04:00
Pavel Emelyanov
c2b7800740 check: Add tun support
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-23 19:18:47 +04:00
Pavel Emelyanov
1ac6d76cbd 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>
2013-08-23 19:10:15 +04:00
Pavel Emelyanov
a3e53658f7 tun: Dump tun files and tun links
The major issue with dump is -- some info id get via netlink,
some via sysfs and some (!) via opened and attached tun file.
But the latter cannot be created, if there's another one attached
(or the mq device is full with threads).

Thus we have to dump this info via existing tun file and keep one
in memory till the link dump code takes place.

Opposite situation is also possible -- we can have a persistent
unattached device. In this case we have to attach to it, dump
things and detach back.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-23 19:02:55 +04:00
Pavel Emelyanov
9615c3b96b tun: Initial skeleton for tun support
There will be two entities handled:

1. tun file -- an opened char device with misc major and tun minor
   that can be attached to item #2

2. tun netdevice -- another type of links

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-23 18:57:40 +04:00