Browse Source

r17564@catbus: nickm | 2008-01-10 13:19:59 -0500
Fix bug in r13094: be sure to set the purpose and send_unencrypted fields correctly in our own routerinfo and extrainfo.


svn:r13098

Nick Mathewson 16 years ago
parent
commit
b84955285a
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/or/router.c

+ 7 - 0
src/or/router.c

@@ -1322,6 +1322,13 @@ router_rebuild_descriptor(int force)
   ri->cache_info.signed_descriptor_len =
     strlen(ri->cache_info.signed_descriptor_body);
 
+  ri->purpose =
+    options->BridgeRelay ? ROUTER_PURPOSE_BRIDGE : ROUTER_PURPOSE_GENERAL;
+  if (!options->BridgeRelay) {
+    ri->cache_info.send_unencrypted = 1;
+    ei->cache_info.send_unencrypted = 1;
+  }
+
   router_get_router_hash(ri->cache_info.signed_descriptor_body,
                          ri->cache_info.signed_descriptor_digest);