diff options
author | David Goulet <dgoulet@torproject.org> | 2019-11-19 11:10:13 -0500 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-11-21 13:02:29 +0200 |
commit | 709d7fba11482a7dae23aaecf8a5ec2bd78e47fb (patch) | |
tree | 37b67530682ea86cb703e59e8d2774484e641193 /src/core | |
parent | 21b3303657f724e7ce4362483092680368839058 (diff) | |
download | tor-709d7fba11482a7dae23aaecf8a5ec2bd78e47fb.tar.gz tor-709d7fba11482a7dae23aaecf8a5ec2bd78e47fb.zip |
hs-v3: Return bad address SOCKS5 extended error
If ExtendedErrors is set for the SocksPort, an invalid .onion address now
returns the 0xF6 error code per prop304.
Closes #30022
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/connection_edge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index 4b4bcff2f4..8ab9d7d26e 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -2123,7 +2123,7 @@ connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn, control_event_client_status(LOG_WARN, "SOCKS_BAD_HOSTNAME HOSTNAME=%s", escaped(socks->address)); if (addresstype == ONION_V3_HOSTNAME) { - conn->socks_request->socks_extended_error_code = SOCKS5_HS_IS_INVALID; + conn->socks_request->socks_extended_error_code = SOCKS5_HS_BAD_ADDRESS; } connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL); return -1; |