[or-cvs] r10737: Patch from Robert Hogan: Generate STREAM NEW events for dnsp (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Thu Jul 5 14:50:06 UTC 2007
Author: nickm
Date: 2007-07-05 10:50:05 -0400 (Thu, 05 Jul 2007)
New Revision: 10737
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/or/connection_edge.c
tor/trunk/src/or/dns.c
tor/trunk/src/or/dnsserv.c
Log:
r13452 at kushana: nickm | 2007-06-20 09:52:55 -0400
Patch from Robert Hogan: Generate STREAM NEW events for dnsport requests and tunneled directory connections. Log when we are testing for hijacking.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13452] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-07-05 14:49:57 UTC (rev 10736)
+++ tor/trunk/ChangeLog 2007-07-05 14:50:05 UTC (rev 10737)
@@ -19,10 +19,12 @@
o Deprecated features:
- RedirectExits is now deprecated.
- o Minor feature (controller):
+ o Minor features (controller):
- You can now use the ControlSocket option to tell Tor to listen for
controller connections on Unix domain sockets on systems that support
them. (Patch from Peter Palfrader.)
+ - STREAM NEW events are generated for DNSPort requests and for tunneled
+ directory connections. (Patch from Robert Hogan.)
o Minor bugfixes (directory):
- Fix another crash bug related to extra-info caching. (Bug found by
Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c 2007-07-05 14:49:57 UTC (rev 10736)
+++ tor/trunk/src/or/connection_edge.c 2007-07-05 14:50:05 UTC (rev 10737)
@@ -1946,6 +1946,8 @@
conn->_base.state = AP_CONN_STATE_CIRCUIT_WAIT;
+ control_event_stream_status(conn, STREAM_EVENT_NEW, 0);
+
/* attaching to a dirty circuit is fine */
if (connection_ap_handshake_attach_circuit(conn) < 0) {
connection_mark_unattached_ap(conn, END_STREAM_REASON_CANT_ATTACH);
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2007-07-05 14:49:57 UTC (rev 10736)
+++ tor/trunk/src/or/dns.c 2007-07-05 14:50:05 UTC (rev 10737)
@@ -1407,6 +1407,9 @@
name[len] = '\0';
strlcat(name, suffix, sizeof(name));
+ log_info(LD_EXIT, "Testing whether our DNS server is hijacking nonexistent "
+ "domains with requrest for bogus hostname \"%s\"", name);
+
addr = tor_strdup(name);
r = evdns_resolve_ipv4(name, DNS_QUERY_NO_SEARCH,
evdns_wildcard_check_callback, addr);
Modified: tor/trunk/src/or/dnsserv.c
===================================================================
--- tor/trunk/src/or/dnsserv.c 2007-07-05 14:49:57 UTC (rev 10736)
+++ tor/trunk/src/or/dnsserv.c 2007-07-05 14:50:05 UTC (rev 10737)
@@ -109,8 +109,6 @@
return;
}
- /* XXXX020 Send a stream event to the controller. */
-
/* Make a new dummy AP connection, and attach the request to it. */
conn = TO_EDGE_CONN(connection_new(CONN_TYPE_AP, AF_INET));
conn->_base.state = AP_CONN_STATE_RESOLVE_WAIT;
@@ -131,6 +129,8 @@
connection_add(TO_CONN(conn));
+ control_event_stream_status(TO_CONN(conn), STREAM_EVENT_NEW, 0);
+
/* Now, throw the connection over to get rewritten (which will answer it
* immediately if it's in the cache, or completely bogus, or automapped),
* and then attached to a circuit. */
More information about the tor-commits
mailing list