aboutsummaryrefslogtreecommitdiff
path: root/src/feature/client/bridges.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-20 10:31:30 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-20 15:55:50 -0500
commit09c6d0324626ffa349c7eed66d9ede92ecd71583 (patch)
treef60e067fd92c53589693d19b0690277202977591 /src/feature/client/bridges.c
parent18654b629f5fdc3f40ca64e41d0e61ea4c7dc6ef (diff)
downloadtor-09c6d0324626ffa349c7eed66d9ede92ecd71583.tar.gz
tor-09c6d0324626ffa349c7eed66d9ede92ecd71583.zip
bridge: Don't initiate connection without a transport
Don't pick the bridge as the guard or launch descriptor fetch if no transport is found. Fixes #40106 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/client/bridges.c')
-rw-r--r--src/feature/client/bridges.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/feature/client/bridges.c b/src/feature/client/bridges.c
index 8e2bb01661..11b2ffd62d 100644
--- a/src/feature/client/bridges.c
+++ b/src/feature/client/bridges.c
@@ -656,6 +656,15 @@ launch_direct_bridge_descriptor_fetch(bridge_info_t *bridge)
DIR_PURPOSE_FETCH_SERVERDESC))
return; /* it's already on the way */
+ if (transport_get_by_name(bridget_get_transport_name(bridge)) == NULL) {
+ download_status_mark_impossible(&bridge->fetch_status);
+ log_warn(LD_CONFIG, "Can't use bridge at %s: there is no configured "
+ "transport called \"%s\".",
+ safe_str_client(fmt_and_decorate_addr(&bridge->addr)),
+ bridget_get_transport_name(bridge));
+ return; /* Can't use this bridge; it has not */
+ }
+
if (routerset_contains_bridge(options->ExcludeNodes, bridge)) {
download_status_mark_impossible(&bridge->fetch_status);
log_warn(LD_APP, "Not using bridge at %s: it is in ExcludeNodes.",