Skip to content

Commit c1c1c4e

Browse files
committed
fix: use "vEthernet (LoopbackAdapterHostNCConnectivity)" when CNS is checking for existance of loopback adapter for Apipa network Creation.
1 parent 1c28add commit c1c1c4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cns/hnsclient/hnsclient_windows.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ const (
5353
// Name of the loopback adapter needed to create Host NC apipa network
5454
hostNCLoopbackAdapterName = "LoopbackAdapterHostNCConnectivity"
5555

56+
// Name of the loopback adapter needed to search for Host NC apipa network
57+
vEthernethostNCLoopbackAdapterName = "vEthernet (LoopbackAdapterHostNCConnectivity)"
58+
5659
// HNS rehydration issue requires this GW to be different than the loopback adapter ip, so we set it to .2
5760
defaultHnsGwIPAddress = "169.254.128.2"
5861
hnsLoopbackAdapterIPAddress = "169.254.128.1"
@@ -301,7 +304,7 @@ func createHostNCApipaNetwork(
301304
}
302305

303306
// Create loopback adapter needed for this HNS network
304-
if interfaceExists, _ := networkcontainers.InterfaceExists(hostNCLoopbackAdapterName); !interfaceExists {
307+
if interfaceExists, _ := networkcontainers.InterfaceExists(vEthernethostNCLoopbackAdapterName); !interfaceExists {
305308
ipconfig := cns.IPConfiguration{
306309
IPSubnet: cns.IPSubnet{
307310
IPAddress: hnsLoopbackAdapterIPAddress,

0 commit comments

Comments
 (0)