summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2021-07-07 13:04:24 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2021-07-07 13:04:24 +0300
commit8b026b4eeef1cb3de672d120dfa2018c9ce67f0d (patch)
tree820b5190f2a5299096246f4371249ab287bc6113 /src
parenta522aabd3b436b56d5575ea808451e1577185bcd (diff)
parent301ffb71a695e89f2e4905e2260fce15439259f1 (diff)
downloadtor-8b026b4eeef1cb3de672d120dfa2018c9ce67f0d.tar.gz
tor-8b026b4eeef1cb3de672d120dfa2018c9ce67f0d.zip
Merge remote-tracking branch 'tor-gitlab/mr/406' into maint-0.4.6
Diffstat (limited to 'src')
-rw-r--r--src/core/or/connection_edge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index a307249967..6f6f22a0d4 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -2536,6 +2536,10 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn,
"https://blog.torproject.org/v2-deprecation-timeline.");
control_event_client_status(LOG_WARN, "SOCKS_BAD_HOSTNAME HOSTNAME=%s",
escaped(socks->address));
+ /* Send back the 0xF6 extended code indicating a bad hostname. This is
+ * mostly so Tor Browser can make a proper UX with regards to v2
+ * addresses. */
+ conn->socks_request->socks_extended_error_code = SOCKS5_HS_BAD_ADDRESS;
connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
return -1;
}