1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

Add stub for the DHT blacklisting support.

Using blacklists with Kademlia is not a good idea, which is why we
don't support it in Transmission.  However, some people insist on
implementing the support in their own copies, this well-defined
hook ensures that at least they'll do it right.
This commit is contained in:
Juliusz Chroboczek 2011-07-25 21:30:46 +00:00
parent d40fea774b
commit 7eda3ae2ec

View file

@ -660,6 +660,17 @@ timer_callback(int s UNUSED, short type UNUSED, void *session )
tr_dhtCallback(NULL, 0, NULL, 0, session); tr_dhtCallback(NULL, 0, NULL, 0, session);
} }
/* This function should return true when a node is blacklisted. We do
not support using a blacklist with the DHT in Transmission, since
massive (ab)use of this feature could harm the DHT. However, feel
free to add support to your private copy as long as you don't
redistribute it. */
int
dht_blacklisted(const struct sockaddr *sa UNUSED, int salen UNUSED)
{
return 0;
}
void void
dht_hash(void *hash_return, int hash_size, dht_hash(void *hash_return, int hash_size,