2 Jan 2012 23:12
Re: PEX and listening ports
Michael Sommerville <msommerville <at> gmail.com>
2012-01-02 22:12:13 GMT
2012-01-02 22:12:13 GMT
On 16 Dec 2011, at 11:57, Michael Sommerville wrote: > On Fri, Dec 16, 2011 at 5:41 AM, <arvid <at> cs.umu.se> wrote: >> Quoting Michael Sommerville <msommerville <at> gmail.com>: >>> Hi, >>> >>> I'm attempting to use libtorrent with ut_pex & ut_metadata extensions >>> and no other trackers or dht. This does work except that the peers >>> don't learn each others listening ports correctly and thus just get >>> download everything from the initial 'canonical' seed. >>> >>> From my investigation so far, it seems that pex messages sent to >>> clients contain the other peers' outbound port rather than their >>> listening port, even though this information is exchanged correctly in >>> the extension handshake. Presumably the intent of pex is to share the >>> listening port? >> >> Yeah, either that or not sharing incoming peers at all (esp. not the ones that >> don't advertise a listen port). The code currently (is supposed to) just filter >> incoming peers. (see ut_pex.cpp/send_peer() this is the predicate determining >> whether or not a peer belongs in the pex set). >> >> To do this, I believe the peer_connection needs to be extended to not just have >> an incoming/outgoing connection flag (m_active), but also have an >> incoming_with_port sate (set where the "p" listen port header is parsed out in >> bt_peer_connection.cpp). This could then be used in the predicate in ut_pex to >> include these peers. Maybe it would be simpler to just store the listen port as >> well, in peer_connection, and if it's != 0 it's assumed to be a valid listen >> connection. >> >> I'd be happy to help you out with any questions if you want to give this patch a(Continue reading)
RSS Feed