#define RESOLVED_TYPE_IPV6 6
#define RESOLVED_TYPE_ERROR_TRANSIENT 0xF0
#define RESOLVED_TYPE_ERROR 0xF1
+/* C Tor internal error code to handle empty dns reply */
+#define RESOLVED_TYPE_NOERROR 0x01F2
/* Negative reasons are internal: we never send them in a DESTROY or TRUNCATE
* call; they only go to the controller for tracking */
/* Now convert it to the ugly old interface */
if (! addr_best) {
connection_ap_handshake_socks_resolved(conn,
- RESOLVED_TYPE_ERROR,0,NULL,-1,-1);
+ RESOLVED_TYPE_NOERROR,0,NULL,-1,-1);
return;
}
break;
case RESOLVED_TYPE_ERROR:
case RESOLVED_TYPE_ERROR_TRANSIENT:
+ case RESOLVED_TYPE_NOERROR:
/* Addr doesn't matter, since we're not sending it back in the reply.*/
return addr;
default:
tor_free(ans);
} else if (answer_type == RESOLVED_TYPE_ERROR) {
err = DNS_ERR_NOTEXIST;
+ } else if (answer_type == RESOLVED_TYPE_NOERROR) {
+ err = DNS_ERR_NONE;
} else { /* answer_type == RESOLVED_TYPE_ERROR_TRANSIENT */
err = DNS_ERR_SERVERFAILED;
}
tt_int_op(r, OP_EQ, 0);
ASSERT_MARK_CALLED(END_STREAM_REASON_DONE|
END_STREAM_REASON_FLAG_ALREADY_SOCKS_REPLIED);
- ASSERT_RESOLVED_CALLED(RESOLVED_TYPE_ERROR, NULL, -1, -1);
+ ASSERT_RESOLVED_CALLED(RESOLVED_TYPE_NOERROR, NULL, -1, -1);
/* If we wanted hostnames, we report nothing, since we only had IPs. */
MOCK_RESET();