@@ -117,7 +117,7 @@ func (e *ContainerEdits) Apply(spec *oci.Spec) error {
117117 // specgen is currently missing functionality to set Linux NetDevices,
118118 // so we use a locally rolled function for now.
119119 for _ , dev := range e .NetDevices {
120- specgenAddLinuxNetDevice (& specgen , dev .HostInterface , (& LinuxNetDevice {dev }).toOCI ())
120+ specgenAddLinuxNetDevice (& specgen , dev .HostInterfaceName , (& LinuxNetDevice {dev }).toOCI ())
121121 }
122122 }
123123
@@ -301,17 +301,17 @@ func ValidateNetDevices(devices []*cdi.LinuxNetDevice) error {
301301 if err := (& LinuxNetDevice {dev }).Validate (); err != nil {
302302 return err
303303 }
304- if other , ok := hostSeen [dev .HostInterface ]; ok {
305- return fmt .Errorf ("invalid linux net device, duplicate HostInterface %q with names %q and %q" ,
306- dev .HostInterface , dev .Name , other )
304+ if other , ok := hostSeen [dev .HostInterfaceName ]; ok {
305+ return fmt .Errorf ("invalid linux net device, duplicate HostInterfaceName %q with names %q and %q" ,
306+ dev .HostInterfaceName , dev .Name , other )
307307 }
308- hostSeen [dev .HostInterface ] = dev .Name
308+ hostSeen [dev .HostInterfaceName ] = dev .Name
309309
310310 if other , ok := nameSeen [dev .Name ]; ok {
311- return fmt .Errorf ("invalid linux net device, duplicate Name %q with HostInterface %q and %q" ,
312- dev .Name , dev .HostInterface , other )
311+ return fmt .Errorf ("invalid linux net device, duplicate Name %q with HostInterfaceName %q and %q" ,
312+ dev .Name , dev .HostInterfaceName , other )
313313 }
314- nameSeen [dev .Name ] = dev .HostInterface
314+ nameSeen [dev .Name ] = dev .HostInterfaceName
315315 }
316316
317317 return nil
@@ -324,8 +324,8 @@ type LinuxNetDevice struct {
324324
325325// Validate LinuxNetDevice.
326326func (d * LinuxNetDevice ) Validate () error {
327- if d .HostInterface == "" {
328- return errors .New ("invalid linux net device, empty HostInterface " )
327+ if d .HostInterfaceName == "" {
328+ return errors .New ("invalid linux net device, empty HostInterfaceName " )
329329 }
330330 if d .Name == "" {
331331 return errors .New ("invalid linux net device, empty Name" )
0 commit comments