fix: remove socket type byte from DomainConnectRequest for public and local sockets

This commit is contained in:
MayaTheShy
2025-11-10 00:08:05 -05:00
parent d14f50d356
commit e5d8dd54b9

View File

@@ -1308,13 +1308,13 @@ void OverteClient::sendDomainConnectRequest() {
qs.writeUInt32BE(hostOrderIPv4);
};
// 10. Public socket: type (quint8) + SockAddr (QHostAddress + quint16 port, WITHOUT socket type per SockAddr QDataStream operator)
qs.writeUInt8(1); // SocketType::UDP
// 10. Public socket: SockAddr (QHostAddress + quint16 port, WITHOUT socket type byte)
// The comment says "WITHOUT socket type per SockAddr QDataStream operator"
// This means we should NOT write the SocketType::UDP byte here!
writeQHostAddressIPv4(localIPv4); // using local as placeholder for public
qs.writeUInt16BE(localPort); // actual local port (might be 0 if not yet bound)
// 11. Local socket: type (quint8) + SockAddr
qs.writeUInt8(1); // SocketType::UDP
// 11. Local socket: SockAddr (without socket type byte)
writeQHostAddressIPv4(localIPv4);
qs.writeUInt16BE(localPort);