[CRIU] [PATCH v4 0/8] net: add support of network device sysctl config

Pavel Tikhomirov ptikhomirov at parallels.com
Wed Oct 8 06:21:34 PDT 2014


One can set those config options with:
sysctl net.ipv4.conf.<device>.<option>=<value>
and check them with:
cat /proc/sys/net/ipv4/conf/<device>/<option>

description: There are a lot of options like enable and configure
IPSEC, ARP, ICMP, SRR, IGMP, Reverse Path Filtering, redirecting.

*do not restore mc_forwarding

https://bugzilla.openvz.org/show_bug.cgi?id=2965

changes:
v2:
include per device conf in net_device_entry,
add per netns entry to hold all and default conf,
invert logic and introduce array of strings,
use criu sysctl engine.
v3:
move PB_NETNS to AUTOGEN;
read/write sysctl-s in batches;
reorder restore: default, all, devices;
do not c/r mc_forwarding option it can be set only
once by multicast daemon using setsockopt on socket,
which will become a multicast managment socket.
v4:
use name of device in ipv4_conf_op instead of full dir,
don't restore the device values that match the "default" set except lo.

Pavel Tikhomirov (8):
  add netns protobuf entry and image, also add conf to net device entry
  add devconfs array to store config options names
  add int(CTL_32)
  save net device confs bunched with criu sysctl API
  dump netns ipv4 conf all/default
  restore netns ipv4 conf all/default
  restore net device ipv4 confs
  optimization: do not restore configs for devices if value is default

 cr-show.c               |   1 +
 image-desc.c            |   1 +
 include/image-desc.h    |   1 +
 include/magic.h         |   1 +
 include/protobuf-desc.h |   5 +-
 include/sysctl.h        |   1 +
 net.c                   | 184 +++++++++++++++++++++++++++++++++++++++++++++++-
 protobuf/netdev.proto   |   7 ++
 sysctl.c                |   7 ++
 9 files changed, 203 insertions(+), 5 deletions(-)

-- 
1.9.3



More information about the CRIU mailing list