From 33762b529694f58d7640ebcbef1bc0f940419c89 Mon Sep 17 00:00:00 2001 From: Jacob Appelbaum Date: Sat, 8 Aug 2009 19:15:22 -0700 Subject: LetsKillNoConnect removes support for .noconnect This is a patch to remove support for .noconnect. We are removing .noconnect because of a talk at Defcon 17 by Gregory Fleischer. --- src/or/connection_edge.c | 16 ---------------- src/or/dnsserv.c | 7 +------ 2 files changed, 1 insertion(+), 22 deletions(-) (limited to 'src/or') diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 79496f7a9..04fffd9f5 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1875,14 +1875,6 @@ connection_ap_handshake_process_socks(edge_connection_t *conn) return -1; } /* else socks handshake is done, continue processing */ - if (hostname_is_noconnect_address(socks->address)) - { - control_event_stream_status(conn, STREAM_EVENT_NEW, 0); - control_event_stream_status(conn, STREAM_EVENT_CLOSED, 0); - connection_mark_unattached_ap(conn, END_STREAM_REASON_DONE); - return -1; - } - if (SOCKS_COMMAND_IS_CONNECT(socks->command)) control_event_stream_status(conn, STREAM_EVENT_NEW, 0); else @@ -2944,11 +2936,3 @@ failed: return BAD_HOSTNAME; } -/** Check if the address is of the form "y.noconnect" - */ -int -hostname_is_noconnect_address(const char *address) -{ - return ! strcasecmpend(address, ".noconnect"); -} - diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index 08cf65309..b1e0ff104 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -92,12 +92,7 @@ evdns_server_callback(struct evdns_server_request *req, void *_data) evdns_server_request_respond(req, DNS_ERR_NONE); return; } - if (q->type == EVDNS_TYPE_A) { - /* Refuse any attempt to resolve a noconnect address, right now. */ - if (hostname_is_noconnect_address(q->name)) { - err = DNS_ERR_REFUSED; - } - } else { + if (q->type != EVDNS_TYPE_A) { tor_assert(q->type == EVDNS_TYPE_PTR); } -- cgit v1.2.3