From 11bb75db9e7cc3ff8d67853ebf84802c10ed2c40 Mon Sep 17 00:00:00 2001 From: Matthew Endsley Date: Thu, 21 Nov 2024 21:13:39 -0800 Subject: [PATCH] Enable `--mac-address` for Windows --- pkg/containerutil/container_network_manager_windows.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/containerutil/container_network_manager_windows.go b/pkg/containerutil/container_network_manager_windows.go index 45128d8bfe9..cec0b57a700 100644 --- a/pkg/containerutil/container_network_manager_windows.go +++ b/pkg/containerutil/container_network_manager_windows.go @@ -50,9 +50,8 @@ func (m *cniNetworkManager) VerifyNetworkOptions(_ context.Context) error { nonZeroArgs := nonZeroMapValues(map[string]interface{}{ "--hostname": m.netOpts.Hostname, "--uts": m.netOpts.UTSNamespace, - // NOTE: IP and MAC settings are currently ignored on Windows. - "--ip-address": m.netOpts.IPAddress, - "--mac-address": m.netOpts.MACAddress, + // NOTE: IP setting is currently ignored on Windows. + "--ip-address": m.netOpts.IPAddress, // NOTE: zero-length slices count as a non-zero-value so we explicitly check length: "--dns-opt/--dns-option": len(m.netOpts.DNSResolvConfOptions) != 0, "--dns-servers": len(m.netOpts.DNSServers) != 0,