mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
bugfix: when tor-resolve asks to resolve an IP to an IP and we answer
immediately, there's no need to send an 'end' relay cell when we close the conn. svn:r2147
This commit is contained in:
parent
6a022bdcdc
commit
54dd90d391
@ -377,6 +377,7 @@ static int connection_ap_handshake_process_socks(connection_t *conn) {
|
|||||||
if (strlen(socks->address) > RELAY_PAYLOAD_SIZE) {
|
if (strlen(socks->address) > RELAY_PAYLOAD_SIZE) {
|
||||||
connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_ERROR,0,NULL);
|
connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_ERROR,0,NULL);
|
||||||
conn->socks_request->has_finished = 1;
|
conn->socks_request->has_finished = 1;
|
||||||
|
conn->has_sent_end = 1;
|
||||||
connection_mark_for_close(conn);
|
connection_mark_for_close(conn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -385,6 +386,7 @@ static int connection_ap_handshake_process_socks(connection_t *conn) {
|
|||||||
connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_IPV4,4,
|
connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_IPV4,4,
|
||||||
(char*)&answer);
|
(char*)&answer);
|
||||||
conn->socks_request->has_finished = 1;
|
conn->socks_request->has_finished = 1;
|
||||||
|
conn->has_sent_end = 1;
|
||||||
connection_mark_for_close(conn);
|
connection_mark_for_close(conn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user