aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-10-29 21:43:23 -0400
committerRoger Dingledine <arma@torproject.org>2011-10-29 21:43:23 -0400
commiteeb6588389397d855512c1973a9d139b55339af6 (patch)
tree8ebdcdc8cbf6289c0fd2b2fe5dd2f16c783c3403 /src/or/connection_or.c
parentc03b4fa826b8051198987b3accf99ceaf0c78657 (diff)
downloadtor-eeb6588389397d855512c1973a9d139b55339af6.tar.gz
tor-eeb6588389397d855512c1973a9d139b55339af6.zip
bridges send netinfo cells like clients on outgoing conns
fixes bug 4348
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 4c0960ceca..202548a6b6 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. */