diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-01-16 11:41:37 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-01-16 11:41:37 -0500 |
commit | 5ed8ac4e57a01f6f29221a795160de302e2f5eee (patch) | |
tree | 98f43461e817a144660d6d813bb0a862306bb756 /src/or | |
parent | f57722d23ec82b711fffc46a8649a8651df7125a (diff) | |
parent | 50028e4d6809f73194ed32031b3c854623582b26 (diff) | |
download | tor-5ed8ac4e57a01f6f29221a795160de302e2f5eee.tar.gz tor-5ed8ac4e57a01f6f29221a795160de302e2f5eee.zip |
Merge remote-tracking branch 'asn/bug7896'
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/entrynodes.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index fd37f3965e..035f3ca8cd 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -1501,9 +1501,17 @@ learned_router_identity(const tor_addr_t *addr, uint16_t port, bridge_info_t *bridge = get_configured_bridge_by_addr_port_digest(addr, port, digest); if (bridge && tor_digest_is_zero(bridge->identity)) { + char *transport_info = NULL; + const char *transport_name = + find_transport_name_by_bridge_addrport(addr, port); + if (transport_name) + tor_asprintf(&transport_info, " (with transport '%s')", transport_name); + memcpy(bridge->identity, digest, DIGEST_LEN); - log_notice(LD_DIR, "Learned fingerprint %s for bridge %s", - hex_str(digest, DIGEST_LEN), fmt_addrport(addr, port)); + log_notice(LD_DIR, "Learned fingerprint %s for bridge %s%s.", + hex_str(digest, DIGEST_LEN), fmt_addrport(addr, port), + transport_info ? transport_info : ""); + tor_free(transport_info); } } @@ -1629,7 +1637,9 @@ find_bridge_by_digest(const char *digest) return NULL; } -/* DOCDOC find_transport_name_by_bridge_addrport */ +/** Given the <b>addr</b> and <b>port</b> of a bridge, if that bridge + * supports a pluggable transport, return its name. Otherwise, return + * NULL. */ const char * find_transport_name_by_bridge_addrport(const tor_addr_t *addr, uint16_t port) { |