diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-06-12 20:55:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-06-12 20:55:53 -0400 |
commit | d7d65298982444d34a15ef0cb3e453ddd584619c (patch) | |
tree | f28743ee5fd440c68437b99a09d050ae786f2ca0 /src/or/control.c | |
parent | 000b4f5cbf80b5cd23b9e03a9a74a6e028321391 (diff) | |
parent | 75b7cc1785c040b4f0deb46b89fecec5c90a9fe6 (diff) | |
download | tor-d7d65298982444d34a15ef0cb3e453ddd584619c.tar.gz tor-d7d65298982444d34a15ef0cb3e453ddd584619c.zip |
Merge remote-tracking branch 'origin/maint-0.2.4'
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index 75f7af99a4..a59300d0f4 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3744,8 +3744,21 @@ control_event_stream_status(entry_connection_t *conn, stream_status_event_t tp, } if (tp == STREAM_EVENT_NEW || tp == STREAM_EVENT_NEW_RESOLVE) { - tor_snprintf(addrport_buf,sizeof(addrport_buf), " SOURCE_ADDR=%s:%d", - ENTRY_TO_CONN(conn)->address, ENTRY_TO_CONN(conn)->port); + /* + * When the control conn is an AF_UNIX socket and we have no address, + * it gets set to "(Tor_internal)"; see dnsserv_launch_request() in + * dnsserv.c. + */ + if (strcmp(ENTRY_TO_CONN(conn)->address, "(Tor_internal)") != 0) { + tor_snprintf(addrport_buf,sizeof(addrport_buf), " SOURCE_ADDR=%s:%d", + ENTRY_TO_CONN(conn)->address, ENTRY_TO_CONN(conn)->port); + } else { + /* + * else leave it blank so control on AF_UNIX doesn't need to make + * something up. + */ + addrport_buf[0] = '\0'; + } } else { addrport_buf[0] = '\0'; } |