diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-03 18:58:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-03 18:58:47 +0000 |
commit | eb0f51f2a373d3c306a0782b14baabb52595415d (patch) | |
tree | 8c05b2d497da24b635789c3746c5fb43f8208da5 | |
parent | 6e0b90a90276e90b8a0d7b5c683f4dc5d29fd33f (diff) | |
download | tor-eb0f51f2a373d3c306a0782b14baabb52595415d.tar tor-eb0f51f2a373d3c306a0782b14baabb52595415d.tar.gz |
r8839@totoro: nickm | 2006-10-02 15:31:49 -0400
Make a field longer to accomodate verbose nicknames; note that verbose nicknames will never reach this point.
svn:r8583
-rw-r--r-- | src/or/connection_edge.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 9692edaad..e8902273d 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -790,9 +790,9 @@ client_dns_set_addressmap(const char *address, uint32_t val, { struct in_addr in; /* <address>.<hex or nickname>.exit\0 or just <address>\0 */ - char extendedaddress[MAX_SOCKS_ADDR_LEN+MAX_HEX_NICKNAME_LEN+10]; + char extendedaddress[MAX_SOCKS_ADDR_LEN+MAX_VERBOSE_NICKNAME_LEN+10]; /* 123.123.123.123.<hex or nickname>.exit\0 or just 123.123.123.123\0 */ - char extendedval[INET_NTOA_BUF_LEN+MAX_HEX_NICKNAME_LEN+10]; + char extendedval[INET_NTOA_BUF_LEN+MAX_VERBOSE_NICKNAME_LEN+10]; char valbuf[INET_NTOA_BUF_LEN]; tor_assert(address); @@ -808,6 +808,9 @@ client_dns_set_addressmap(const char *address, uint32_t val, in.s_addr = htonl(val); tor_inet_ntoa(&in,valbuf,sizeof(valbuf)); if (exitname) { + /* XXXX fails to ever get attempts to get an exit address of + * google.com.digest[=~]nickname.exit; we need a syntax for this that + * won't make strict RFC952-compliant applications (like us) barf. */ tor_snprintf(extendedaddress, sizeof(extendedaddress), "%s.%s.exit", address, exitname); tor_snprintf(extendedval, sizeof(extendedval), |