diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-27 15:31:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-27 15:31:29 -0400 |
commit | 9c0a1adfa21f12e6682fa26d43fbf91bab4e6fc3 (patch) | |
tree | 4854edff8e71379627e00cd23c8e3e0db63abc6e /src/or | |
parent | a83abcf5ee5cb8fe245bc97e089e082f62921194 (diff) | |
download | tor-9c0a1adfa21f12e6682fa26d43fbf91bab4e6fc3.tar tor-9c0a1adfa21f12e6682fa26d43fbf91bab4e6fc3.tar.gz |
Don't do a DNS lookup on a bridge line address
Fixes bug 10801; bugfix on 07bf274d in 0.2.0.1-alpha.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/or/config.c b/src/or/config.c index ef0294626..fc959f7c3 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4169,16 +4169,10 @@ parse_bridge_line(const char *line, int validate_only) addrport = field1; } - if (tor_addr_port_lookup(addrport, &addr, &port)<0) { + if (tor_addr_port_parse(LOG_INFO, addrport, &addr, &port, 443)<0) { log_warn(LD_CONFIG, "Error parsing Bridge address '%s'", addrport); goto err; } - if (!port) { - log_info(LD_CONFIG, - "Bridge address '%s' has no port; using default port 443.", - addrport); - port = 443; - } if (smartlist_len(items)) { fingerprint = smartlist_join_strings(items, "", 0, NULL); @@ -4384,7 +4378,7 @@ get_bindaddr_from_transport_listen_line(const char *line,const char *transport) goto err; /* Validate addrport */ - if (tor_addr_port_parse(LOG_WARN, addrport, &addr, &port)<0) { + if (tor_addr_port_parse(LOG_WARN, addrport, &addr, &port, -1)<0) { log_warn(LD_CONFIG, "Error parsing ServerTransportListenAddr " "address '%s'", addrport); goto err; |