I was doing some tests on how eMule reply to some firewalled_requests and by chance i tried to send a request with an old kad versione (<7).
The results was that i never receive any reply and that the client who i send the request, sent a packet to an ip which was exactly the opposite of mine.
If mine was: 123.456.789.102, it sent the KADEMLIA_FIREWALLED_ACK_RES packet to 102.789.456.123.
So i went to the source code and i noticed that on ClientList.cpp (line 564) there's something like this:
Kademlia::CKademlia::GetUDPListener()->SendNullPacket(KADEMLIA_FIREWALLED_ACK_RES, ntohl(cur_client->GetIP()), cur_client->GetKadPort(), 0, NULL);
Is it correct to call that ntohl function there? Is it in the right place?
Page 1 of 1
Kademlia_Firewalled_Ack_Res And Opposite Ip
#2
Posted 28 January 2011 - 08:28 PM
Without checking it in detail: Yes it is correct. Kad uses a different endianness than the rest of the eMule code (for historic reasons). Clientlist is eMule core code, UDP-Listener Kad.
Page 1 of 1










Sign In
Register
