fix: update sendDomainConnectRequest to use actual IPv4 address and port for public and local sockets
This commit is contained in:
@@ -1309,13 +1309,13 @@ void OverteClient::sendDomainConnectRequest() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 10. Public socket: SockAddr (QHostAddress + quint16 port)
|
// 10. Public socket: SockAddr (QHostAddress + quint16 port)
|
||||||
// Try sending a NULL address (protocol 0) to see if server figures it out from UDP source
|
// Write the actual IPv4 address and port
|
||||||
qs.writeUInt8(0); // QAbstractSocket::AnyIPProtocol (means null/unknown)
|
writeQHostAddressIPv4(localIPv4);
|
||||||
qs.writeUInt16BE(0); // port 0
|
qs.writeUInt16BE(localPort);
|
||||||
|
|
||||||
// 11. Local socket: SockAddr
|
// 11. Local socket: SockAddr
|
||||||
qs.writeUInt8(0); // QAbstractSocket::AnyIPProtocol
|
writeQHostAddressIPv4(localIPv4);
|
||||||
qs.writeUInt16BE(0); // port 0
|
qs.writeUInt16BE(localPort);
|
||||||
|
|
||||||
// 12. Node types of interest (QList<NodeType_t>)
|
// 12. Node types of interest (QList<NodeType_t>)
|
||||||
// Write as Qt container: size (qint32) + elements (quint8) -- include a few mixers we want
|
// Write as Qt container: size (qint32) + elements (quint8) -- include a few mixers we want
|
||||||
|
|||||||
Reference in New Issue
Block a user