diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-18 15:13:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-18 15:13:59 -0400 |
commit | 3f837d4826cce0e7917e79d73b81aefc3fefc6bd (patch) | |
tree | 180f45b7c1825911a9ee085221874653aa44eeb2 /src/or/control.c | |
parent | 7e9b6a19d4cdc605039f4e0107cbd5f4781fe150 (diff) | |
download | tor-3f837d4826cce0e7917e79d73b81aefc3fefc6bd.tar.gz tor-3f837d4826cce0e7917e79d73b81aefc3fefc6bd.zip |
Make stream events for RESOLVE lookups more consistent
Fixes 8203; patch by Desoxy
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/or/control.c b/src/or/control.c index 03e5d79c8e..2a68464189 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2939,7 +2939,7 @@ handle_control_resolve(control_connection_t *conn, uint32_t len, failed = smartlist_new(); SMARTLIST_FOREACH(args, const char *, arg, { if (!is_keyval_pair(arg)) { - if (dnsserv_launch_request(arg, is_reverse)<0) + if (dnsserv_launch_request(arg, is_reverse, conn)<0) smartlist_add(failed, (char*)arg); } }); @@ -3742,7 +3742,7 @@ control_event_stream_status(entry_connection_t *conn, stream_status_event_t tp, } } - if (tp == STREAM_EVENT_NEW) { + 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); } else { @@ -3752,11 +3752,7 @@ control_event_stream_status(entry_connection_t *conn, stream_status_event_t tp, if (tp == STREAM_EVENT_NEW_RESOLVE) { purpose = " PURPOSE=DNS_REQUEST"; } else if (tp == STREAM_EVENT_NEW) { - if (ENTRY_TO_EDGE_CONN(conn)->is_dns_request || - (conn->socks_request && - SOCKS_COMMAND_IS_RESOLVE(conn->socks_request->command))) - purpose = " PURPOSE=DNS_REQUEST"; - else if (conn->use_begindir) { + if (conn->use_begindir) { connection_t *linked = ENTRY_TO_CONN(conn)->linked_conn; int linked_dir_purpose = -1; if (linked && linked->type == CONN_TYPE_DIR) |