feat: enhance Ping packet handling to include local ID sourcing

This commit is contained in:
MayaTheShy
2025-11-09 01:02:48 -05:00
parent 2e3b453ab0
commit c16873691b

View File

@@ -1013,8 +1013,12 @@ void OverteClient::sendDomainListRequest() {
}
void OverteClient::sendPing(int fd, const sockaddr_storage& addr, socklen_t addrLen) {
// Create NLPacket for Ping with correct version
// Create NLPacket for Ping with correct version - sourced if we have a local ID
NLPacket packet(PacketType::Ping, PacketVersions::Ping_IncludeConnectionID, false);
if (m_localID != 0) {
packet.setSourced(true);
packet.setSourceID(m_localID);
}
packet.setSequenceNumber(m_sequenceNumber++);
// Add timestamp (microseconds since epoch)