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

Github-Pull: #20668
Rebased-From: 010eed3ce0
This commit is contained in:
Adam Jonas
2020-12-15 20:37:32 -05:00
committed by MarcoFalke
parent e4440eb67b
commit 84e8d5467f
2 changed files with 6 additions and 2 deletions

View File

@@ -2050,7 +2050,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;