From 38ec01ab95f95ea0eb8a689a90773ebcb4dc3623 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Tue, 2 Jan 2024 14:49:53 +0000 Subject: [PATCH] add linux network device to the spec --- specs-go/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specs-go/config.go b/specs-go/config.go index d1236ba72..45cfbdcf6 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -228,6 +228,8 @@ type Linux struct { Namespaces []LinuxNamespace `json:"namespaces,omitempty"` // Devices are a list of device nodes that are created for the container Devices []LinuxDevice `json:"devices,omitempty"` + // NetDevices are a list of device nodes that are created for the container + NetDevices []LinuxNetDevice `json:"netdevices,omitempty"` // Seccomp specifies the seccomp security settings for the container. Seccomp *LinuxSeccomp `json:"seccomp,omitempty"` // RootfsPropagation is the rootfs mount propagation mode for the container. @@ -483,6 +485,12 @@ type LinuxDevice struct { GID *uint32 `json:"gid,omitempty"` } +// LinuxNetDevice represents the information for a Linux network device +type LinuxNetDevice struct { + // Name of the network device. + Name string `json:"name"` +} + // LinuxDeviceCgroup represents a device rule for the devices specified to // the device controller type LinuxDeviceCgroup struct {