[CRIU] [PATCH 00/12] Dump and restore internal veth devices

Andrei Vagin avagin at openvz.org
Tue Feb 28 15:52:56 PST 2017


From: Andrei Vagin <avagin at virtuozzo.com>

This series adds support for internal veth devices. Here is no tricks.
We create a veth pair and for one of these devices we set a netns id
where it has to be created. Another device is created in the current
network namespace.

Andrei Vagin (12):
  images: add a network namespace id into images
  kerndat: check whether a kernel supports netns id-s or not
  netlink: add nla_get_s32()
  net: transfer ns_id structures to functions about c/r-ing netns
  netns: create a netlink route socket out of dump_links()
  netns: dump and restore network namespace ID-s
  net: give ns_id to link_info functions
  netns: restore internal veth devices
  net: split restore_links on read and restore parts
  net: create a list of all links
  net: dump and restore connected to a bridge links
  test: check veth devices from two network namespaces

 criu/cr-check.c                      |  28 ++
 criu/include/kerndat.h               |   2 +
 criu/include/libnetlink.h            |   2 +
 criu/include/namespaces.h            |  17 +
 criu/include/net.h                   |  10 +-
 criu/include/tun.h                   |   3 +-
 criu/kerndat.c                       |  26 +
 criu/libnetlink.c                    |   5 +
 criu/namespaces.c                    |  13 +-
 criu/net.c                           | 927 ++++++++++++++++++++++++++++-------
 criu/tun.c                           |   5 +-
 images/netdev.proto                  |  12 +
 scripts/build/Dockerfile.tmpl        |   1 +
 scripts/travis/travis-tests          |   2 +-
 test/zdtm/static/Makefile            |   2 +
 test/zdtm/static/netns_sub_veth.c    | 117 +++++
 test/zdtm/static/netns_sub_veth.desc |   6 +
 17 files changed, 1002 insertions(+), 176 deletions(-)
 create mode 100644 test/zdtm/static/netns_sub_veth.c
 create mode 100644 test/zdtm/static/netns_sub_veth.desc

-- 
2.7.4



More information about the CRIU mailing list