Bind our UDP sockets to the same local address used by RTSP handshake

This means we can ensure a consistent local address for our outgoing PING
traffic to keep the UDP flows alive without having to call connect() which breaks
with multi-homed hosts on GFE and Sunshine v0.20 and earlier.
This commit is contained in:
Cameron Gutman committed 2023-10-26 01:09:26 -05:00
1 parent c86f49ee7f
commit 05c3f9c754
10 files changed
+66 -40

No files matched your search

+1 -1
View File
@@ -73,7 +73,7 @@ int LiFindExternalAddressIP4(const char* stunServer, unsigned short stunPort, un
goto Exit;
}
sock = bindUdpSocket(hints.ai_family, 0);
sock = bindUdpSocket(hints.ai_family, NULL, 0, 0);
if (sock == INVALID_SOCKET) {
err = LastSocketFail();
Limelog("Failed to connect to STUN server: %d\n", err);