diff options
| author | Adam Jonas <[email protected]> | 2020-12-15 20:37:32 -0500 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-12-17 12:28:37 +0100 |
| commit | 84e8d5467fcec3b7c8ce950cd7a3e7e7b24452a3 (patch) | |
| tree | ae6883d0389eecb2f33831c8e96bcdf810751876 /src/net.cpp | |
| parent | doc: Add warnings for http interfaces limitations (diff) | |
| download | discoin-84e8d5467fcec3b7c8ce950cd7a3e7e7b24452a3.tar.xz discoin-84e8d5467fcec3b7c8ce950cd7a3e7e7b24452a3.zip | |
doc: warn that incoming conns are unlikely when not using default ports
Github-Pull: #20668
Rebased-From: 010eed3ce03cf4fc622a48f40fc4d589383f7a44
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index cf987b699..1fd913eb6 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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; |