commit eeb6588389397d855512c1973a9d139b55339af6 Author: Roger Dingledine arma@torproject.org Date: Sat Oct 29 21:43:23 2011 -0400
bridges send netinfo cells like clients on outgoing conns
fixes bug 4348 --- changes/bug4348 | 7 +++++++ src/or/connection_or.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/changes/bug4348 b/changes/bug4348 new file mode 100644 index 0000000..d2b226d --- /dev/null +++ b/changes/bug4348 @@ -0,0 +1,7 @@ + Privacy fixes: + - Bridges no longer include their address in NETINFO cells on outgoing + OR connections, to allow them to blend in better with clients. + Removes another avenue for enumerating bridges. Reported by + "troll_un". Fixes bug 4348; bugfix on 0.2.0.10-alpha, when NETINFO + cells were introduced. + diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 4c0960c..202548a 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1928,8 +1928,11 @@ connection_or_send_netinfo(or_connection_t *conn) return -1; out += len;
- /* My address. */ - if ((me = router_get_my_routerinfo())) { + /* My address -- only include it if I'm a public relay, or if I'm a + * bridge and this is an incoming connection. If I'm a bridge and this + * is an outgoing connection, act like a normal client and omit it. */ + if ((public_server_mode(get_options()) || !conn->is_outgoing) && + (me = router_get_my_routerinfo())) { tor_addr_t my_addr; *out++ = 1; /* only one address is supported. */