Browse Source

Correctly send a SUCCEEDED event for rdns requests

The issue was that we overlooked the possibility of reverse DNS success
at the end of connection_ap_handshake_socks_resolved(). Issue discovered
by katmagic, thanks!
Sebastian Hahn 13 years ago
parent
commit
3ab09763ce
2 changed files with 7 additions and 1 deletions
  1. 5 0
      changes/bug3536
  2. 2 1
      src/or/connection_edge.c

+ 5 - 0
changes/bug3536

@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - Send a SUCCEEDED stream event to the controller when a reverse
+      resolve succeeded. Fixes bug 3536; bugfix on 0.0.8pre1. Issue
+      discovered by katmagic.
+

+ 2 - 1
src/or/connection_edge.c

@@ -2611,7 +2611,8 @@ connection_ap_handshake_socks_resolved(edge_connection_t *conn,
   }
   connection_ap_handshake_socks_reply(conn, buf, replylen,
           (answer_type == RESOLVED_TYPE_IPV4 ||
-           answer_type == RESOLVED_TYPE_IPV6) ?
+           answer_type == RESOLVED_TYPE_IPV6 ||
+           answer_type == RESOLVED_TYPE_HOSTNAME) ?
                                       0 : END_STREAM_REASON_RESOLVEFAILED);
 }