summaryrefslogtreecommitdiff
path: root/src/or/rendcache.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-06-01 13:21:03 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2017-08-19 16:42:26 +0300
commitbce18a764252c66e605680e29a27ea30375a6db1 (patch)
tree579234b52e9c012d89ba1ed3d90051038a738c93 /src/or/rendcache.c
parent3e593f09addb210f1da39bd46f5fb904cac4e410 (diff)
downloadtor-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/rendcache.c')
-rw-r--r--src/or/rendcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rendcache.c b/src/or/rendcache.c
index 11b60b36a1..792f6a1302 100644
--- a/src/or/rendcache.c
+++ b/src/or/rendcache.c
@@ -512,7 +512,7 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e)
tor_assert(rend_cache);
tor_assert(query);
- if (!rend_valid_service_id(query)) {
+ if (!rend_valid_v2_service_id(query)) {
ret = -EINVAL;
goto end;
}
@@ -558,7 +558,7 @@ rend_cache_lookup_v2_desc_as_service(const char *query, rend_cache_entry_t **e)
tor_assert(rend_cache_local_service);
tor_assert(query);
- if (!rend_valid_service_id(query)) {
+ if (!rend_valid_v2_service_id(query)) {
ret = -EINVAL;
goto end;
}