aboutsummaryrefslogtreecommitdiff
path: root/src/i2p.cpp
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-03-08 20:59:26 -0500
committerAva Chow <github@achow101.com>2024-03-08 21:15:24 -0500
commita78ca706f66e36998453c6f94fe9a1eaf6ee30be (patch)
treea6f0b86f2d0efdba9d62612e11657f70da78a68c /src/i2p.cpp
parentc07935bcf56298caa3aceb9834db26f96e8421e0 (diff)
parent5b358cdd1a5f5d2fe87a9e41c638996eab2e2796 (diff)
downloadbitcoin-a78ca706f66e36998453c6f94fe9a1eaf6ee30be.tar.xz
Merge bitcoin/bitcoin#29393: i2p: log connection was refused due to arbitrary port
5b358cdd1a5f5d2fe87a9e41c638996eab2e2796 i2p: log connection was refused due to arbitrary port (brunoerg) Pull request description: For I2P, we do not try to connect if port is != 0. However, we do not have anything that indicates it or any error when trying to connect with port != 0. This PR adds a log for it. Also, it improves the functional test. With this log we can ensure the reason we won't connect is the port, in the current test, we cannot ensure it. ACKs for top commit: jonatack: ACK 5b358cdd1a5f5d2fe87a9e41c638996eab2e2796 epiccurious: re-ACK 5b358cdd1a5f5d2fe87a9e41c638996eab2e2796. achow101: ACK 5b358cdd1a5f5d2fe87a9e41c638996eab2e2796 kristapsk: re-ACK 5b358cdd1a5f5d2fe87a9e41c638996eab2e2796 vasild: ACK 5b358cdd1a5f5d2fe87a9e41c638996eab2e2796 Tree-SHA512: 027245afa771c9295fff0bfd17c251dca4a9f4c739e5773922de3c030a65ef05d96291edcbdeeaa50ba3add61f75f28d8c00be503e03fc33d3491d1956fc549f
Diffstat (limited to 'src/i2p.cpp')
-rw-r--r--src/i2p.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp
index 4b79a6826b..02f2c1cea2 100644
--- a/src/i2p.cpp
+++ b/src/i2p.cpp
@@ -217,6 +217,7 @@ bool Session::Connect(const CService& to, Connection& conn, bool& proxy_error)
// Refuse connecting to arbitrary ports. We don't specify any destination port to the SAM proxy
// when connecting (SAM 3.1 does not use ports) and it forces/defaults it to I2P_SAM31_PORT.
if (to.GetPort() != I2P_SAM31_PORT) {
+ Log("Error connecting to %s, connection refused due to arbitrary port %s", to.ToStringAddrPort(), to.GetPort());
proxy_error = false;
return false;
}