diff --git a/agent/api/task/task_windows.go b/agent/api/task/task_windows.go index 25f11fc1e38..f55ab29ed07 100644 --- a/agent/api/task/task_windows.go +++ b/agent/api/task/task_windows.go @@ -278,7 +278,7 @@ func (task *Task) BuildCNIConfig(includeIPAMConfig bool, cniConfig *ecscni.Confi // IfName is expected by the plugin but is not used. cniConfig.NetworkConfigs = append(cniConfig.NetworkConfigs, &ecscni.NetworkConfig{ - IfName: eni.ID, + IfName: ecscni.DefaultENIName, CNINetworkConfig: netconf, }) } diff --git a/agent/ecscni/types_windows.go b/agent/ecscni/types_windows.go index 249c5b9ad19..69312c5a922 100644 --- a/agent/ecscni/types_windows.go +++ b/agent/ecscni/types_windows.go @@ -35,6 +35,8 @@ const ( // NetworkName has to be non-empty field for network config. // We do not actually make use of the field, hence passing in a placeholder string to fulfill the API spec defaultNetworkName = "network-name" + // DefaultENIName is the name of eni interface name in the container namespace + DefaultENIName = "eth0" ) var (