diff --git a/images/Makefile b/images/Makefile index a29a04922..a8420de1c 100644 --- a/images/Makefile +++ b/images/Makefile @@ -58,6 +58,7 @@ proto-obj-y += opts.o proto-obj-y += seccomp.o proto-obj-y += binfmt-misc.o proto-obj-y += time.o +proto-obj-y += sysctl.o CFLAGS += -iquote $(obj)/ diff --git a/images/netdev.proto b/images/netdev.proto index dafa2bd8f..ce0daebae 100644 --- a/images/netdev.proto +++ b/images/netdev.proto @@ -1,5 +1,6 @@ import "opts.proto"; import "tun.proto"; +import "sysctl.proto"; enum nd_type { LOOPBACK = 1; @@ -31,9 +32,14 @@ message net_device_entry { optional bytes address = 7; repeated int32 conf = 8; + + repeated sysctl_entry conf4 = 9; } message netns_entry { repeated int32 def_conf = 1; repeated int32 all_conf = 2; + + repeated sysctl_entry def_conf4 = 3; + repeated sysctl_entry all_conf4 = 4; } diff --git a/images/sysctl.proto b/images/sysctl.proto new file mode 100644 index 000000000..c64789a7f --- /dev/null +++ b/images/sysctl.proto @@ -0,0 +1,11 @@ +enum SysctlType { + __CTL_STR = 5; + CTL_32 = 6; +} + +message sysctl_entry { + required SysctlType type = 1; + + optional int32 iarg = 2; + optional string sarg = 3; +}