Skip to content

Commit

Permalink
Enable --mac-address for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mendsley committed Nov 22, 2024
1 parent 6ff09eb commit 11bb75d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/containerutil/container_network_manager_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 11bb75d

Please sign in to comment.