diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-06-01 13:21:03 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-08-19 16:42:26 +0300 |
commit | bce18a764252c66e605680e29a27ea30375a6db1 (patch) | |
tree | 579234b52e9c012d89ba1ed3d90051038a738c93 /src/or/connection_edge.h | |
parent | 3e593f09addb210f1da39bd46f5fb904cac4e410 (diff) | |
download | tor-bce18a764252c66e605680e29a27ea30375a6db1.tar.gz tor-bce18a764252c66e605680e29a27ea30375a6db1.zip |
prop224: Refactor parse_extended_hostname() to parse v3 addrs.
We need this func so that we recognize SOCKS conns to v3 addresses.
- Also rename rend_valid_service_id() to rend_valid_v2_service_id()
- Also move parse_extended_hostname() tests to their own unittest, and
add a v3 address to the test as well.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/connection_edge.h')
-rw-r--r-- | src/or/connection_edge.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h index 9987f88b85..914238fc1f 100644 --- a/src/or/connection_edge.h +++ b/src/or/connection_edge.h @@ -98,7 +98,8 @@ int connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn, /** Possible return values for parse_extended_hostname. */ typedef enum hostname_type_t { - NORMAL_HOSTNAME, ONION_HOSTNAME, EXIT_HOSTNAME, BAD_HOSTNAME + NORMAL_HOSTNAME, ONION_V2_HOSTNAME, ONION_V3_HOSTNAME, + EXIT_HOSTNAME, BAD_HOSTNAME } hostname_type_t; hostname_type_t parse_extended_hostname(char *address); |