Skip to content

Commit

Permalink
Fix split tunnel on ipv4 only networks (#9982)
Browse files Browse the repository at this point in the history
* Fix split tunnel on ipv4 only networks

* Do not return uninitalized memory
  • Loading branch information
strseb authored Oct 29, 2024
1 parent ace0b51 commit 86c5853
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platforms/windows/daemon/windowssplittunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ bool WindowsSplitTunnel::getAddress(int adapterIndex, IN_ADDR* out_ipv4,
logger.debug() << "Ipv4 Conversation error" << WSAGetLastError();
return false;
}
if (ipv6.empty()) {
std::memset(out_ipv6, 0x00, sizeof(IN6_ADDR));
return true;
}
if (InetPtonW(AF_INET6, ipv6.c_str(), out_ipv6) != 1) {
logger.debug() << "Ipv6 Conversation error" << WSAGetLastError();
return false;
Expand Down

0 comments on commit 86c5853

Please sign in to comment.