summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 822bc629bc..48e33b9c80 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -4152,7 +4152,7 @@ get_bindaddr_from_transport_listen_line(const char *line,const char *transport)
smartlist_t *items = NULL;
const char *parsed_transport = NULL;
char *addrport = NULL;
- char *addr = NULL;
+ tor_addr_t addr;
uint16_t port = 0;
items = smartlist_new();
@@ -4172,18 +4172,12 @@ get_bindaddr_from_transport_listen_line(const char *line,const char *transport)
goto err;
/* Validate addrport */
- if (tor_addr_port_split(LOG_WARN, addrport, &addr, &port)<0) {
+ if (tor_addr_port_parse(LOG_WARN, addrport, &addr, &port)<0) {
log_warn(LD_CONFIG, "Error parsing ServerTransportListenAddr "
"address '%s'", addrport);
goto err;
}
- if (!port) {
- log_warn(LD_CONFIG,
- "ServerTransportListenAddr address '%s' has no port.", addrport);
- goto err;
- }
-
goto done;
err:
@@ -4193,7 +4187,6 @@ get_bindaddr_from_transport_listen_line(const char *line,const char *transport)
done:
SMARTLIST_FOREACH(items, char*, s, tor_free(s));
smartlist_free(items);
- tor_free(addr);
return addrport;
}