mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user