summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-24 19:35:28 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-24 19:35:28 -0400
commit594cf92498c8ea12dc0b19f743d6b88d4a98f1eb (patch)
treec4358510a57824e1b21b5de6adfdfff30626e027 /src/or/router.c
parent122a7f8848785e3cefef812749c7ec1844b26402 (diff)
parent02cde0d9398c43de3a67133b7982d9df6962fe32 (diff)
downloadtor-594cf92498c8ea12dc0b19f743d6b88d4a98f1eb.tar.gz
tor-594cf92498c8ea12dc0b19f743d6b88d4a98f1eb.zip
Merge branch 'feature18329_029_squashed' into maint-0.3.2
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 172531e70e..8ad5d038ef 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -2956,6 +2956,18 @@ router_dump_router_to_string(routerinfo_t *router,
smartlist_add_asprintf(chunks, "contact %s\n", ci);
}
+ if (options->BridgeRelay) {
+ const char *bd;
+ if (options->BridgeDistribution && strlen(options->BridgeDistribution)) {
+ bd = options->BridgeDistribution;
+ } else {
+ bd = "any";
+ }
+ if (strchr(bd, '\n') || strchr(bd, '\r'))
+ bd = escaped(bd);
+ smartlist_add_asprintf(chunks, "bridge-distribution-request %s\n", bd);
+ }
+
if (router->onion_curve25519_pkey) {
char kbuf[128];
base64_encode(kbuf, sizeof(kbuf),