-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Don't require peer_ids to match expectations
If a connection has already been made to a particular ip/port and the peer_id is known, or if a non-compact response is returned by the tracker so the peer_id for a given remote ip/port is 'known', do *not* close the connection if the actual client at that ip/port returns a different peer_id. While the torrent spec requires that these connections be closed, there are a few reasons which make this fairly pointless. 1) libtorrent randomises these by default. Other clients probably randomise these too. 2) It's normal for these to change when a client restarts anyway. Clients may be restarted for any number of reasons. 3) They're not transmitted by DHT, and are not transmitted by the tracker by default. 4) The onus is on the *connecting* peer to close the connection, which means the check is only 50% effective anyway. A client could still join the swarm by making outgoing connections to other peers. If someone really wants this enabled, it can be enabled on a per-torrent basis using the new setting in TorrentSettings. Probably address #627
- Loading branch information
1 parent
3159b44
commit 005a4b3
Showing
4 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters