diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-10-24 19:43:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-24 19:43:13 -0400 |
commit | e5c341eb7c1189985d903f708ce91516da7f0c76 (patch) | |
tree | 7d7518037709815f7a3260bcf4c72a90fd6b7047 /src | |
parent | 3498183807fa626289aab98ed8b2477176a70190 (diff) | |
parent | e7126a1030233fd656cff4a8ee998026065fb65b (diff) | |
download | tor-e5c341eb7c1189985d903f708ce91516da7f0c76.tar.gz tor-e5c341eb7c1189985d903f708ce91516da7f0c76.zip |
Merge branch 'maint-0.3.2'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/bridges.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/bridges.c b/src/or/bridges.c index 1c748b4156..320f5ee632 100644 --- a/src/or/bridges.c +++ b/src/or/bridges.c @@ -54,6 +54,8 @@ struct bridge_info_t { }; static void bridge_free(bridge_info_t *bridge); +static void rewrite_node_address_for_bridge(const bridge_info_t *bridge, + node_t *node); /** A list of configured bridges. Whenever we actually get a descriptor * for one, we add it as an entry guard. Note that the order of bridges @@ -574,6 +576,12 @@ launch_direct_bridge_descriptor_fetch(bridge_info_t *bridge) return; } + /* If we already have a node_t for this bridge, rewrite its address now. */ + node_t *node = node_get_mutable_by_id(bridge->identity); + if (node) { + rewrite_node_address_for_bridge(bridge, node); + } + tor_addr_port_t bridge_addrport; memcpy(&bridge_addrport.addr, &bridge->addr, sizeof(tor_addr_t)); bridge_addrport.port = bridge->port; |