[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.3.2] Minimal implementation of bridge-distribution-request



commit 9f2efd02a1281998d11049162c11af6bfc5851c0
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Nov 13 20:44:51 2017 -0500

    Minimal implementation of bridge-distribution-request
    
    Just advertise the line when we're a bridge, using "any" if we're
    published or "none" if we aren't.
    
    This is done in lieu of a full backport of #18329.
---
 changes/bug18329-minimal | 6 ++++++
 src/or/router.c          | 9 +++++++++
 2 files changed, 15 insertions(+)

diff --git a/changes/bug18329-minimal b/changes/bug18329-minimal
new file mode 100644
index 000000000..804c4e8dd
--- /dev/null
+++ b/changes/bug18329-minimal
@@ -0,0 +1,6 @@
+  o Minor features (bridge):
+    - Bridges now include notice in their descriptors that they are bridges,
+      and notice of their distribution status, based on their publication
+      settings.  Implements ticket 18329.  For more fine-grained control of
+      how a bridge is distributed, upgrade to 0.3.2.x or later.
+
diff --git a/src/or/router.c b/src/or/router.c
index 2cdbb0c8b..90b2431a2 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2385,6 +2385,15 @@ router_dump_router_to_string(routerinfo_t *router,
     smartlist_add_asprintf(chunks, "contact %s\n", ci);
   }
 
+  if (options->BridgeRelay) {
+    const char *bd;
+    if (options->PublishServerDescriptor_ & BRIDGE_DIRINFO)
+      bd = "any";
+    else
+      bd = "none";
+    smartlist_add_asprintf(chunks, "bridge-distribution-request %s\n", bd);
+  }
+
 #ifdef CURVE25519_ENABLED
   if (router->onion_curve25519_pkey) {
     char kbuf[128];



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits