]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
conn: MetricsPort listener is a listener port
authorDavid Goulet <dgoulet@torproject.org>
Wed, 12 May 2021 19:13:50 +0000 (15:13 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 12 May 2021 19:13:50 +0000 (15:13 -0400)
The connection type for the listener part was missing from the "is
connection a listener" function.

This lead to our periodic event that retries our listeners to keep
trying to bind() again on an already opened MetricsPort.

Closes #40370

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/ticket40370 [new file with mode: 0644]
src/core/mainloop/connection.c

diff --git a/changes/ticket40370 b/changes/ticket40370
new file mode 100644 (file)
index 0000000..fcdb0eb
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfix (metrics port):
+    - Fix a bug that made tor try to re-bind() every 60 seconds on an already
+      open MetricsPort. Fixes bug 40370; bugfix on 0.4.5.1-alpha.
+
index ada542629a3202e26e5887073a08da784b2cbf25..c827af7a9acdea3034c9dab736fd56d2ed616e2c 100644 (file)
@@ -4944,6 +4944,7 @@ connection_is_listener(connection_t *conn)
       conn->type == CONN_TYPE_AP_NATD_LISTENER ||
       conn->type == CONN_TYPE_AP_HTTP_CONNECT_LISTENER ||
       conn->type == CONN_TYPE_DIR_LISTENER ||
+      conn->type == CONN_TYPE_METRICS_LISTENER ||
       conn->type == CONN_TYPE_CONTROL_LISTENER)
     return 1;
   return 0;