Skip to content

Commit 28331b4

Browse files
authored
change apipa endpoint gateway back to .1 (#3653)
* change apipa endpoint gateway back to .1 * lint fix * add comment
1 parent 3189cda commit 28331b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cns/hnsclient/hnsclient_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ func configureHostNCApipaEndpoint(
507507
}
508508

509509
networkContainerApipaIP := localIPConfiguration.IPSubnet.IPAddress
510-
hostApipaIP := localIPConfiguration.GatewayIPAddress
511510
protocolList := []string{protocolICMPv4, protocolTCP, protocolUDP}
512511

513512
endpointPolicies, err := configureAclSettingHostNCApipaEndpoint(
@@ -526,8 +525,9 @@ func configureHostNCApipaEndpoint(
526525
endpoint.Policies = append(endpoint.Policies, endpointPolicy)
527526
}
528527

528+
// keep Apipa Endpoint gw as 169.254.128.1 to make sure NC to host connectivity work for both Linux and Windows containers
529529
hcnRoute := hcn.Route{
530-
NextHop: hostApipaIP,
530+
NextHop: hnsLoopbackAdapterIPAddress,
531531
DestinationPrefix: "0.0.0.0/0",
532532
}
533533

0 commit comments

Comments
 (0)