diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-11-14 18:05:01 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-11-14 18:05:01 +0000 |
commit | b052b810e2f9b9094482725fead5cbab6340bb25 (patch) | |
tree | 5a7d91acd1dbaf6126cf879358f4ea416e8df98c /src | |
parent | ad1f019110435944bb5a29931a17b0bcb74e6db7 (diff) | |
download | tor-b052b810e2f9b9094482725fead5cbab6340bb25.tar tor-b052b810e2f9b9094482725fead5cbab6340bb25.tar.gz |
r9319@totoro: nickm | 2006-11-14 13:04:50 -0500
Patch from Zajcev Evgeny to make natd work properly (we needed to allow extra characters after the port number).
svn:r8952
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_edge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 55dd17197..1a5ab6a2d 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1550,7 +1550,8 @@ connection_ap_process_natd(edge_connection_t *conn) /* pretend that a socks handshake completed so we don't try to * send a socks reply down a natd conn */ strlcpy(socks->address, daddr, sizeof(socks->address)); - socks->port = (uint16_t) tor_parse_long(tbuf, 10, 1, 65535, &port_ok, NULL); + socks->port = (uint16_t) + tor_parse_long(tbuf, 10, 1, 65535, &port_ok, &daddr); if (!port_ok) { log_warn(LD_APP,"Natd handshake failed; port '%s' is ill-formed or out " "of range.", escaped(tbuf)); |