Official eMule-Board: Kademlia_Firewalled_Ack_Res And Opposite Ip - Official eMule-Board

Jump to content


Page 1 of 1

Kademlia_Firewalled_Ack_Res And Opposite Ip

#1 User is offline   4gn0 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 23-November 10

Posted 27 January 2011 - 09:47 PM

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?
0

#2 User is offline   Some Support 

  • Last eMule
  • PipPipPipPipPipPipPip
  • Group: Yes
  • Posts: 3,411
  • Joined: 27-June 03

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.

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users