doc: warn that incoming conns are unlikely when not using default ports

This commit is contained in:
Adam Jonas
2020-12-15 20:37:32 -05:00
parent c434e2cca9
commit 010eed3ce0
2 changed files with 6 additions and 2 deletions

View File

@@ -2081,7 +2081,11 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
continue;
}
// do not allow non-default ports, unless after 50 invalid addresses selected already
// Do not allow non-default ports, unless after 50 invalid
// addresses selected already. This is to prevent malicious peers
// from advertising themselves as a service on another host and
// port, causing a DoS attack as nodes around the network attempt
// to connect to it fruitlessly.
if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50)
continue;