diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-11 12:02:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-11 12:02:19 -0400 |
commit | 426f6bfda2440f4de99c4579be773dfbabac039f (patch) | |
tree | 54af81c24341f4b3f8369cbe28993922d05f717c /src/or/routerparse.c | |
parent | 491e20ae13c3acdd6d18d994cc41178733a778b5 (diff) | |
download | tor-426f6bfda2440f4de99c4579be773dfbabac039f.tar.gz tor-426f6bfda2440f4de99c4579be773dfbabac039f.zip |
Stop using addr_port_lookup as an address splitting function
It's too risky to have a function where if you leave one parameter
NULL, it splits up address:port strings, but if you set it, it does
hostname resolution.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index dbd9c934f3..6fd8db296d 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1812,9 +1812,9 @@ authority_cert_parse_from_string(const char *s, const char **end_of_string) struct in_addr in; char *address = NULL; tor_assert(tok->n_args); - /* XXX023 use tor_addr_port_lookup() below instead. -RD */ - if (addr_port_lookup(LOG_WARN, tok->args[0], &address, NULL, - &cert->dir_port)<0 || + /* XXX023 use some tor_addr parse function below instead. -RD */ + if (tor_addr_port_split(LOG_WARN, tok->args[0], &address, + &cert->dir_port) < 0 || tor_inet_aton(address, &in) == 0) { log_warn(LD_DIR, "Couldn't parse dir-address in certificate"); tor_free(address); |