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

[or-cvs] r8952: Patch from Zajcev Evgeny to make natd work properly (we need (in tor/trunk: . src/or)



Author: nickm
Date: 2006-11-14 13:05:01 -0500 (Tue, 14 Nov 2006)
New Revision: 8952

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



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

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2006-11-14 08:07:33 UTC (rev 8951)
+++ tor/trunk/src/or/connection_edge.c	2006-11-14 18:05:01 UTC (rev 8952)
@@ -1550,7 +1550,8 @@
   /* 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));