patchmldonkey, a multi-networks file-sharing client - Patches: patch #5336, Fix LowID support for eDonkey...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5336: Fix LowID support for eDonkey network

Submitter:  Krzysztof Nowicki <krissn>
Submitted:  Sun 27 Aug 2006 06:12:21 PM UTC
   
 
Category:  Bug fixes Priority:  7 - High
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Mon 25 Sep 2006 10:40:59 PM UTC, comment #7: 

Applied 2006/09/26

spiralvoice <spiralvoice>
Group administrator
Sun 10 Sep 2006 09:26:13 PM UTC, comment #6: 

I use this patch and it appears ok.

Joakim Verona <jave>
Group Member
Tue 29 Aug 2006 10:28:45 AM UTC, comment #5: 

Missed another spot where the indirect client's IP:port wasn't being set to null. Now this seems to really work as expected.

Krzysztof Nowicki <krissn>
Mon 28 Aug 2006 03:55:46 PM UTC, comment #4: 

I've corrected the patch implemented the same comparison scheme when finding a source for a client (donkeyGlobals:619). This seems to prevent double sources from appearing on the list (two sources with the same id)

Krzysztof Nowicki <krissn>
Sun 27 Aug 2006 07:00:19 PM UTC, comment #3: 

I did, but I must have somehow omitted this one... But why should we check the server IP after all?

Krzysztof Nowicki <krissn>
Sun 27 Aug 2006 06:50:48 PM UTC, comment #2: 

About the first part of your patch, did you read this?
http://mldonkey.sourceforge.net/forums/viewtopic.php?p=16799#16799

spiralvoice <spiralvoice>
Group administrator
Sun 27 Aug 2006 06:50:18 PM UTC, comment #1: 

Re-made the patch, because it didn't apply cleanly against version 2.7.7.

Krzysztof Nowicki <krissn>
Sun 27 Aug 2006 06:12:21 PM UTC, original submission:  

The fact that MLDonkey has a problem with indirect connections is really nothing new. I've been digging into this for some time and I think I found the main reason why this doesn't work. The normal handling of a LowID client is as follows:
1. MLD gets a LowID source. A client structure for client 1 is created with client_kind Indirect_address(serverip, serverport, clientid, 0.0.0.0, 0). The IP:port is not known at this stage.
2. CommonSources issues a connection request to client 1.
3. MLD sends a QueryID packet to the server owning that client.
4. The client connects and is identified as a new incoming connection. A search is made to find out, if such a client is already known, but this search won't bring any results, because now that the real IP:port is known, we search for a client with client_kind = Indirect_address(serverip, serverport, clientid, clientip, clientport). Of course such a client doesn't exist and a new client 2 is created.
5. CommonSources doesn't know that client 1 (which is not connected) and client 2 (which is now connected and waiting for a file request) are in fact one and the same client. As a result client 1 connection attempt fails, and client 2 disconnects itself after some idle time, because it didn't receive any request.

To make things work I've fixed stage 4. I've rewritten the comparison in donkeyGlobals:new_client to ignore client IP:port if the client is indirect.
The effect: callback connections running and resulting in a nice, fat data stream from indirect sources right after adding a file into the download queue.

Please review this patch whether it is correct or improve it, as I think there is still some room for it.

Krzysztof Nowicki <krissn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10627:  mldonkey-2.7.7-lowid-4.patch added by krissn (3KiB - application/octet-stream - fixed one more spot)
file #10617:  mldonkey-2.7.7-lowid-3.patch added by krissn (2KiB - application/octet-stream - revised patch to prevent double sources)
file #10612:  mldonkey-2.7.7-lowid-2.patch added by krissn (2KiB - application/octet-stream)
file #10611:  5336_2.patch added by spiralvoice (2KiB - application/octet-stream - updated patch to apply with current CVS)
file #10610:  mldonkey-2.7.7-lowid.patch added by krissn (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 8 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-09-25 spiralvoice StatusNone Done
    Open/ClosedOpen Closed
2006-08-29 krissn Attached File- Added mldonkey-2.7.7-lowid-4.patch, #10627
2006-08-28 krissn Attached File- Added mldonkey-2.7.7-lowid-3.patch, #10617
2006-08-27 spiralvoice Priority5 - Normal 7 - High
2006-08-27 krissn Attached File- Added mldonkey-2.7.7-lowid-2.patch, #10612
2006-08-27 spiralvoice Attached File- Added 5336_2.patch, #10611
2006-08-27 krissn Attached File- Added mldonkey-2.7.7-lowid.patch, #10610

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code