[tor-bugs] #7829 [Tor]: support all kinds of DNS over Tor

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Jun 29 00:19:07 UTC 2013


#7829: support all kinds of DNS over Tor
-----------------------------------------------+----------------------------
 Reporter:  proper                             |          Owner:                  
     Type:  task                               |         Status:  new             
 Priority:  critical                           |      Milestone:  Tor: unspecified
Component:  Tor                                |        Version:                  
 Keywords:  tor-relay needs-proposal dnssocks  |         Parent:                  
   Points:                                     |   Actualpoints:                  
-----------------------------------------------+----------------------------

Comment(by ikurua22):

 Not tested, but...

 **********[1]**********
   for (i = 0; i < req->nquestions; ++i) {
 <--------------------------------LINE 87
     if (req->questions[i]->dns_question_class != EVDNS_CLASS_INET)
       continue;
     switch (req->questions[i]->type) {
       case EVDNS_TYPE_A:
       case EVDNS_TYPE_AAAA:
       case EVDNS_TYPE_PTR:
 //!!---<ADD start
       case EVDNS_TYPE_MX:
       case EVDNS_TYPE_TXT:
 //!!--->ADD end
         q = req->questions[i];
       default:
         break;
       }
   }<--------------------------------LINE 98

 **********[2]**********
   if (q->type != EVDNS_TYPE_A && q->type != EVDNS_TYPE_AAAA)
 {<-----------LINE 105
     tor_assert(q->type == EVDNS_TYPE_PTR);
   }<------------------LINE 107

 - LINE 105
 + LINE 105: if (q->type != EVDNS_TYPE_A && q->type != EVDNS_TYPE_AAAA &&
 q->type != EVDNS_TYPE_MX && q->type != EVDNS_TYPE_TXT) {

 **********[3]**********

   if (q->type == EVDNS_TYPE_A || q->type == EVDNS_TYPE_AAAA) <--------LINE
 129
     entry_conn->socks_request->command = SOCKS_COMMAND_RESOLVE;
   else>--------------------LINE 131

 - LINE 129
 + LINE 129: if (q->type == EVDNS_TYPE_A || q->type == EVDNS_TYPE_AAAA ||
 q->type == EVDNS_TYPE_MX || q->type == EVDNS_TYPE_TXT)

 **********[4]**********
 From Line 265 ~

 Damn. Seems like current source code *only* thinks about
 "resolve IP to hostname" and "resolve hostname to IP addr".

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7829#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list