]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Allow clients to use relays as bridges
authorSebastian Hahn <sebastian@torproject.org>
Fri, 20 Aug 2010 05:39:03 +0000 (07:39 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Fri, 20 Aug 2010 21:45:00 +0000 (23:45 +0200)
changes/bug1776_v3 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/bug1776_v3 b/changes/bug1776_v3
new file mode 100644 (file)
index 0000000..18d5185
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Really allow clients to use relays as bridges. Fixes bug 1776;
+      bugfix on 0.2.2.15-alpha.
index 8808f56db90dc87b921311487b27fc5ee295c8ee..c393e0768e223246ac1afd7e3ba2a5c5f0b74181 100644 (file)
@@ -3159,8 +3159,10 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
     /* If we have this descriptor already and the new descriptor is a bridge
      * descriptor, replace it. If we had a bridge descriptor before and the
      * new one is not a bridge descriptor, don't replace it. */
-    if (old_router && (!routerinfo_is_a_configured_bridge(router) ||
-                routerinfo_is_a_configured_bridge(old_router))) {
+    tor_assert(old_router);
+    if (! (routerinfo_is_a_configured_bridge(router) &&
+            (router->purpose == ROUTER_PURPOSE_BRIDGE ||
+             old_router->purpose != ROUTER_PURPOSE_BRIDGE))) {
       log_info(LD_DIR,
                "Dropping descriptor that we already have for router '%s'",
                router->nickname);