[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Nothing actually _uses_ socks_port, so why publish it? For ...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Nothing actually _uses_ socks_port, so why publish it? For ...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Tue, 4 Jan 2005 00:46:57 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 04 Jan 2005 00:47:20 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv27806/src/or
Modified Files:
or.h router.c routerparse.c test.c
Log Message:
Nothing actually _uses_ socks_port, so why publish it? For backward compatibility, publish a socks_port of 0, and never read socks_port.
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.515
retrieving revision 1.516
diff -u -d -r1.515 -r1.516
--- or.h 4 Jan 2005 01:16:20 -0000 1.515
+++ or.h 4 Jan 2005 05:46:54 -0000 1.516
@@ -600,7 +600,6 @@
uint32_t addr; /**< IPv4 address of OR, in host order. */
uint16_t or_port; /**< Port for OR-to-OR and OP-to-OR connections. */
- uint16_t socks_port; /**< Port for SOCKS connections. */
uint16_t dir_port; /**< Port for HTTP directory connections. */
time_t published_on; /**< When was the information in this routerinfo_t
Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- router.c 3 Jan 2005 17:53:20 -0000 1.138
+++ router.c 4 Jan 2005 05:46:54 -0000 1.139
@@ -552,7 +552,6 @@
ri->nickname = tor_strdup(options->Nickname);
ri->addr = addr;
ri->or_port = options->ORPort;
- ri->socks_port = hibernating ? 0 : options->SocksPort;
ri->dir_port = hibernating ? 0 : options->DirPort;
ri->published_on = time(NULL);
ri->onion_pkey = crypto_pk_dup_key(get_onion_key()); /* must invoke from main thread */
@@ -683,7 +682,7 @@
/* Generate the easy portion of the router descriptor. */
result = tor_snprintf(s, maxlen,
- "router %s %s %d %d %d\n"
+ "router %s %s %d 0 %d\n"
"platform %s\n"
"published %s\n"
"opt fingerprint %s\n"
@@ -694,7 +693,6 @@
router->nickname,
router->address,
router->or_port,
- router->socks_port,
router->dir_port,
router->platform,
published,
Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerparse.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- routerparse.c 3 Jan 2005 17:53:20 -0000 1.96
+++ routerparse.c 4 Jan 2005 05:46:54 -0000 1.97
@@ -805,7 +805,6 @@
if (tok->n_args >= 5) {
router->or_port = (uint16_t) tor_parse_long(tok->args[2],10,0,65535,NULL,NULL);
- router->socks_port = (uint16_t) tor_parse_long(tok->args[3],10,0,65535,NULL,NULL);
router->dir_port = (uint16_t) tor_parse_long(tok->args[4],10,0,65535,NULL,NULL);
ports_set = 1;
}
@@ -824,7 +823,6 @@
goto err;
}
router->or_port = (uint16_t) tor_parse_long(tok->args[0],10,0,65535,NULL,NULL);
- router->socks_port = (uint16_t) tor_parse_long(tok->args[1],10,0,65535,NULL,NULL);
router->dir_port = (uint16_t) tor_parse_long(tok->args[2],10,0,65535,NULL,NULL);
ports_set = 1;
}
@@ -951,8 +949,8 @@
router->platform = tor_strdup("<unknown>");
}
-// log_fn(LOG_DEBUG,"or_port %d, socks_port %d, dir_port %d, bandwidthrate %u, bandwidthburst %u.",
-// router->or_port, router->socks_port, router->dir_port,
+// log_fn(LOG_DEBUG,"or_port %d, dir_port %d, bandwidthrate %u, bandwidthburst %u.",
+// router->or_port, router->dir_port,
// (unsigned) router->bandwidthrate, (unsigned) router->bandwidthburst);
goto done;
Index: test.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/test.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- test.c 24 Dec 2004 02:17:32 -0000 1.161
+++ test.c 4 Jan 2005 05:46:54 -0000 1.162
@@ -1030,7 +1030,6 @@
r1.addr = 0xc0a80001u; /* 192.168.0.1 */
r1.published_on = 0;
r1.or_port = 9000;
- r1.socks_port = 9002;
r1.dir_port = 9003;
r1.onion_pkey = pk1;
r1.identity_pkey = pk2;
@@ -1057,7 +1056,6 @@
r2.platform = tor_strdup(platform);
r2.published_on = 5;
r2.or_port = 9005;
- r2.socks_port = 0;
r2.dir_port = 0;
r2.onion_pkey = pk2;
r2.identity_pkey = pk1;
@@ -1109,7 +1107,6 @@
test_assert(rp1);
test_streq(rp1->address, r1.address);
test_eq(rp1->or_port, r1.or_port);
- test_eq(rp1->socks_port, r1.socks_port);
test_eq(rp1->dir_port, r1.dir_port);
test_eq(rp1->bandwidthrate, r1.bandwidthrate);
test_eq(rp1->bandwidthburst, r1.bandwidthburst);
@@ -1133,7 +1130,6 @@
test_assert(rp2);
test_streq(rp2->address, r2.address);
test_eq(rp2->or_port, r2.or_port);
- test_eq(rp2->socks_port, r2.socks_port);
test_eq(rp2->dir_port, r2.dir_port);
test_eq(rp2->bandwidth, r2.bandwidth);
test_assert(crypto_pk_cmp_keys(rp2->onion_pkey, pk2) == 0);