patch to resolve task 132
Geoffrey Goodell
goodell at cassandra.eecs.harvard.edu
Tue May 10 21:14:53 UTC 2005
Please consider this patch, which appears to resolve task 132.
Geoff
-------------- next part --------------
Only in or.patch: .routerlist.c.swp
Only in or: CVS
diff -u or/connection_edge.c or.patch/connection_edge.c
--- or/connection_edge.c 2005-05-07 01:55:06.000000000 -0400
+++ or.patch/connection_edge.c 2005-05-09 14:51:25.000000000 -0400
@@ -914,6 +914,19 @@
if (addresstype == EXIT_HOSTNAME) {
/* .exit -- modify conn to specify the exit node. */
char *s = strrchr(socks->address,'.');
+ if (!s) {
+ struct in_addr in;
+ char *orig = tor_strdup(socks->address);
+ routerinfo_t *r = router_get_by_nickname(socks->address);
+
+ if(r) {
+ in.s_addr = htonl(r->addr);
+ strlcpy(socks->address, inet_ntoa(in), sizeof(socks->address));
+ strlcat(socks->address, ".", sizeof(socks->address));
+ strlcat(socks->address, orig, sizeof(socks->address));
+ s = strrchr(socks->address,'.');
+ }
+ }
if (!s || s[1] == '\0') {
log_fn(LOG_WARN,"Malformed exit address '%s'. Refusing.",
safe_str(socks->address));
Only in or.patch: connection_edge.c~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20050510/56eac0e0/attachment.pgp>
More information about the tor-dev
mailing list