2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-25 11:27:40 +00:00

19 Commits

Author SHA1 Message Date
Pavel Emelyanov
dffe544fe8 show: Show netdevice indices with %d
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-21 16:47:32 +04:00
Pavel Emelyanov
d10ee39f28 code: Fix checkpatch.pl warnings since v0.1
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-11 22:03:11 +04:00
Pavel Emelyanov
1a62282d48 net: Push the host end of a veth to original netns
The call will then have to handle this end (put into a bridge).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 19:14:36 +04:00
Pavel Emelyanov
076faf7443 net: Preliminary veth restore
The peer device is named veth_host and is supposed to be pushed outside
the netns being restored for proper host-side configuration.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:36:00 +04:00
Pavel Emelyanov
3fee68f56b net: Put IFLA_LINKINFO attr on newlink if required
Veth will fill the linkinfo part for peer.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:32:56 +04:00
Pavel Emelyanov
9d18a851c2 net: Put ifname and mtu on newlink request
The name will be valid for new veth, mtu has to be restored for all devices.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:31:03 +04:00
Pavel Emelyanov
ff3770a22d net: Declare and expand a struct with newlink request
We need to add payload to NEWLINK request and will have to work with it outside the
restore_one_link fn.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:29:49 +04:00
Pavel Emelyanov
425ed1e92c net: Pass NLM_F_CREATE flag on link restore
This one is required to say, that we do want a new device is it doesn't exists.
This is so for all the devices except lo.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:25:42 +04:00
Pavel Emelyanov
4ae4c4acc9 net: Dump veth device
These devices can be distinguished by type ETHER and kind "veth".
Some problems with peer detection exists (described in comment), but
we cannot handle them at the moment.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:24:11 +04:00
Pavel Emelyanov
b57fb6da34 net: Move ifla parsing higher the call-stack
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-10 17:20:22 +04:00
Andrey Vagin
d0fd98c9fc show: don't show RAW images in show_all
If an image isn't specified, crtool shows content of all images.
Now crtools aborts in this case due to BUG_ON(1) in show methods
for raw images. I sugget to skip such images.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-09 16:22:32 +04:00
Pavel Emelyanov
657a544fb7 pb: Rewrite object showing to use pb-descs
The pb_show things are no longer macros.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-07 19:22:02 +04:00
Pavel Emelyanov
b1b0a39a58 pb: Rewrite object reading to use pb-descs
The pb_read thing is no longer a macros. This will allow to
factor out objects collecting on restore.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-07 19:22:00 +04:00
Pavel Emelyanov
2398c55e41 pb: Rewrite object writing to use pb-descs
The pb_write thing is no longer a macros.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-07 19:21:59 +04:00
Pavel Emelyanov
a6439860cd net: Routes dump and restore
Same here -- run ip tool and that's it.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:31:46 +04:00
Pavel Emelyanov
fc1eb96783 netns: Ifaddrs dump and restore
Just run the ip addr save and ip addr restore respectively.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:26:43 +04:00
Pavel Emelyanov
0b9b1bd91a netns: Introduce a routine that runs ip tool for dump/restore
The thing is that the ip utililty is very likely to have support
for ifaddrs and routes dumping and restore (rtnl messages are
symmetrical wrt dump/restore and this can be easily dump in there).

Thus, the best we can do it just use this tool for that and carry
the "raw" images with ifaddrs and routes dump.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:21:19 +04:00
Pavel Emelyanov
4943eb43fd netns: Basic link dump, restore and show
Only support the lo device. This is not final yet (much more
stuff is to be handled for a link) but is rather a skeleton
showing how to do it and letting us check the LXC container
early.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:17:27 +04:00
Pavel Emelyanov
0a827aa96c net: Basic netns dump/restore skeleton
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-08-02 08:06:29 +04:00