Skip to content

Commit 31e28b4

Browse files
committed
Providing default values for port bindings: wslcsdk.cpp
1 parent 954d1a0 commit 31e28b4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/windows/WslcSDK/wslcsdk.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,12 @@ try
593593
bindingAddressStrings[i] = addrBuf;
594594
convertedPort.BindingAddress = bindingAddressStrings[i].c_str();
595595
}
596+
else
597+
{
598+
// If no binding address is provided, default to wildcard.
599+
convertedPort.Family = AF_UNSPEC;
600+
convertedPort.BindingAddress = nullptr;
601+
}
596602
}
597603
containerOptions.Ports = convertedPorts.get();
598604
containerOptions.PortsCount = static_cast<ULONG>(internalContainerSettings->portsCount);

0 commit comments

Comments
 (0)