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>
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>
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>
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>
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>
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>
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>
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>