]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Refrain from listener rebinding when address families differ
authorrl1987 <rl1987@sdf.lonestar.org>
Tue, 2 Oct 2018 12:47:05 +0000 (15:47 +0300)
committerrl1987 <rl1987@sdf.lonestar.org>
Mon, 15 Oct 2018 13:18:31 +0000 (16:18 +0300)
changes/bug27928 [new file with mode: 0644]
src/core/mainloop/connection.c

diff --git a/changes/bug27928 b/changes/bug27928
new file mode 100644 (file)
index 0000000..a4ea63e
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (networking):
+    - Refrain from attempting socket rebinding when old
+      and new listeners are in different address families.
+      Fixes bug 27928; bugfix on 0.3.5.1-alpha.
index 9ef0561a554febaaeb4b9201c6e3eabfaeb988e1..5ebfac6bee48da41da57bdf58f1df9f8f5da6f14 100644 (file)
@@ -2798,6 +2798,7 @@ retry_listener_ports(smartlist_t *old_conns,
         }
 #ifdef ENABLE_LISTENER_REBIND
         const int may_need_rebind =
+          tor_addr_family(&wanted->addr) == tor_addr_family(&conn->addr) &&
           port_matches_exact && bool_neq(tor_addr_is_null(&wanted->addr),
                                          tor_addr_is_null(&conn->addr));
         if (replacements && may_need_rebind) {