[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8583: Make a field longer to accomodate verbose nicknames; note th (in tor/trunk: . src/or)



Author: nickm
Date: 2006-10-03 14:58:47 -0400 (Tue, 03 Oct 2006)
New Revision: 8583

Modified:
   tor/trunk/
   tor/trunk/src/or/connection_edge.c
Log:
 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.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/branches/verbose-nicknames [r8839] on 96637b51-b116-0410-a10e-9941ebb49b64

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2006-10-03 18:58:40 UTC (rev 8582)
+++ tor/trunk/src/or/connection_edge.c	2006-10-03 18:58:47 UTC (rev 8583)
@@ -790,9 +790,9 @@
 {
   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 @@
   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),