mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Use preferred address when looking for bridges by routerinfo_t.
This should be safe to do for all uses of get_configured_bridge_by_routerinfo().
This commit is contained in:
parent
7b02d1a73e
commit
6048f01971
@ -4856,9 +4856,11 @@ static bridge_info_t *
|
||||
get_configured_bridge_by_routerinfo(const routerinfo_t *ri)
|
||||
{
|
||||
tor_addr_t addr;
|
||||
tor_addr_from_ipv4h(&addr, ri->addr);
|
||||
return get_configured_bridge_by_addr_port_digest(&addr,
|
||||
ri->or_port, ri->cache_info.identity_digest);
|
||||
uint16_t port;
|
||||
|
||||
router_get_pref_addr_port(ri, &addr, &port);
|
||||
return get_configured_bridge_by_addr_port_digest(&addr, port,
|
||||
ri->cache_info.identity_digest);
|
||||
}
|
||||
|
||||
/** Return 1 if <b>ri</b> is one of our known bridges, else 0. */
|
||||
|
Loading…
Reference in New Issue
Block a user