From bce18a764252c66e605680e29a27ea30375a6db1 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Thu, 1 Jun 2017 13:21:03 +0300 Subject: 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 --- src/or/rendclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or/rendclient.c') diff --git a/src/or/rendclient.c b/src/or/rendclient.c index e47e1ef639..fbfba27a23 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -1466,7 +1466,7 @@ rend_parse_service_authorization(const or_options_t *options, goto err; } strlcpy(auth->onion_address, onion_address, REND_SERVICE_ID_LEN_BASE32+1); - if (!rend_valid_service_id(auth->onion_address)) { + if (!rend_valid_v2_service_id(auth->onion_address)) { log_warn(LD_CONFIG, "Onion address has wrong format: '%s'", onion_address); goto err; -- cgit v1.2.3-54-g00ecf