aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-10-11 12:02:19 -0400
committerNick Mathewson <nickm@torproject.org>2011-10-11 12:02:19 -0400
commit426f6bfda2440f4de99c4579be773dfbabac039f (patch)
tree54af81c24341f4b3f8369cbe28993922d05f717c /src/or/connection_edge.c
parent491e20ae13c3acdd6d18d994cc41178733a778b5 (diff)
downloadtor-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/connection_edge.c')
-rw-r--r--src/or/connection_edge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 2293a30614..508f69e5a6 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2894,9 +2894,9 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
END_STREAM_REASON_TORPROTOCOL, NULL);
return 0;
}
- if (addr_port_lookup(LOG_PROTOCOL_WARN,
- (char*)(cell->payload+RELAY_HEADER_SIZE),
- &address,NULL,&port)<0) {
+ if (tor_addr_port_split(LOG_PROTOCOL_WARN,
+ (char*)(cell->payload+RELAY_HEADER_SIZE),
+ &address,&port)<0) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
"Unable to parse addr:port in relay begin cell. Closing.");
relay_send_end_cell_from_edge(rh.stream_id, circ,