aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop/connection.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-12-20 09:11:30 -0500
committerDavid Goulet <dgoulet@torproject.org>2022-12-20 09:11:30 -0500
commit923463a1e68418a284c4992a1da52ca30efa9ffd (patch)
treec793f7ae5be433ac84ee6c0a09d53448a8f10b3a /src/core/mainloop/connection.c
parent713efae94bf3d9038c83f09a6d808b087144a5d6 (diff)
downloadtor-923463a1e68418a284c4992a1da52ca30efa9ffd.tar.gz
tor-923463a1e68418a284c4992a1da52ca30efa9ffd.zip
Fix duplicate code after tor-gitlab/mr/671 forward merge
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/mainloop/connection.c')
-rw-r--r--src/core/mainloop/connection.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index d99498d6be..7204b69e54 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -2233,23 +2233,6 @@ connection_connect_sockaddr,(connection_t *conn,
tor_socket_strerror(errno));
}
-#ifdef IP_BIND_ADDRESS_NO_PORT
- static int try_ip_bind_address_no_port = 1;
- if (bindaddr && try_ip_bind_address_no_port &&
- setsockopt(s, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &(int){1}, sizeof(int))) {
- if (errno == EINVAL) {
- log_notice(LD_NET, "Tor was built with support for "
- "IP_BIND_ADDRESS_NO_PORT, but the current kernel "
- "doesn't support it. This might cause Tor to run out "
- "of ephemeral ports more quickly.");
- try_ip_bind_address_no_port = 0;
- } else {
- log_warn(LD_NET, "Error setting IP_BIND_ADDRESS_NO_PORT on new "
- "connection: %s", tor_socket_strerror(errno));
- }
- }
-#endif
-
/* From ip(7): Inform the kernel to not reserve an ephemeral port when using
* bind(2) with a port number of 0. The port will later be automatically
* chosen at connect(2) time, in a way that allows sharing a source port as