[or-cvs] get rid of 0.0.8 backwards compatibility

Roger Dingledine arma at seul.org
Thu Jan 13 20:22:42 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuituse.c config.c connection_edge.c connection_or.c or.h 
	routerlist.c 
Log Message:
get rid of 0.0.8 backwards compatibility


Index: circuituse.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuituse.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- circuituse.c	13 Jan 2005 07:23:19 -0000	1.41
+++ circuituse.c	13 Jan 2005 20:22:37 -0000	1.42
@@ -85,9 +85,6 @@
 
     if (conn->socks_request &&
         conn->socks_request->command == SOCKS_COMMAND_RESOLVE) {
-      /* 0.0.8 servers have buggy resolve support. */
-      if (!tor_version_as_new_as(exitrouter->platform, "0.0.9pre1"))
-        return 0;
     } else if (purpose == CIRCUIT_PURPOSE_C_GENERAL) {
       if (!connection_ap_can_use_exit(conn, exitrouter)) {
         /* can't exit from this router */

Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.299
retrieving revision 1.300
diff -u -d -r1.299 -r1.300
--- config.c	12 Jan 2005 06:42:31 -0000	1.299
+++ config.c	13 Jan 2005 20:22:37 -0000	1.300
@@ -1332,8 +1332,7 @@
 #define MIN_REND_POST_PERIOD 300
 #define MIN_STATUS_FETCH_PERIOD 60
 
-  /* After 0.0.8 is dead, change this to MIN_ONION_KEY_LIFETIME. */
-#define MAX_DIR_PERIOD (OLD_MIN_ONION_KEY_LIFETIME/2)
+#define MAX_DIR_PERIOD (MIN_ONION_KEY_LIFETIME/2)
 #define MAX_CACHE_DIR_FETCH_PERIOD 3600
 #define MAX_CACHE_STATUS_FETCH_PERIOD 900
 

Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -d -r1.266 -r1.267
--- connection_edge.c	12 Jan 2005 06:42:31 -0000	1.266
+++ connection_edge.c	13 Jan 2005 20:22:38 -0000	1.267
@@ -1016,11 +1016,7 @@
     }
   }
 
-  if (conn->socks_request->command == SOCKS_COMMAND_RESOLVE) {
-    /* 0.0.8 servers have buggy resolve support. */
-    if (!tor_version_as_new_as(exit->platform, "0.0.9pre1"))
-      return 0;
-  } else {
+  if (conn->socks_request->command != SOCKS_COMMAND_RESOLVE) {
     addr = client_dns_lookup_entry(conn->socks_request->address);
     if (router_compare_addr_to_addr_policy(addr, conn->socks_request->port,
           exit->exit_policy) == ADDR_POLICY_REJECTED)

Index: connection_or.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_or.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- connection_or.c	12 Jan 2005 06:42:32 -0000	1.153
+++ connection_or.c	13 Jan 2005 20:22:38 -0000	1.154
@@ -344,16 +344,10 @@
   conn->state = OR_CONN_STATE_OPEN;
   connection_watch_events(conn, EV_READ);
   log_fn(LOG_DEBUG,"tls handshake done. verifying.");
-  if (! tor_tls_peer_has_cert(conn->tls)) { /* It's an old OP. */
-    if (server_mode(options)) { /* I'm an OR; good. */
-      conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP;
-      return 0;
-    } else { /* Neither side sent a certificate: ouch. */
-      log_fn(LOG_WARN,"Neither peer sent a cert! Closing.");
-      return -1;
-    }
+  if (! tor_tls_peer_has_cert(conn->tls)) {
+    log_fn(LOG_WARN,"Peer didn't send a cert! Closing.");
+    return -1;
   }
-  /* Okay; the other side is an OR or a post-0.0.8 OP (with a cert). */
   if (tor_tls_get_peer_cert_nickname(conn->tls, nickname, sizeof(nickname))) {
     log_fn(LOG_WARN,"Other side (%s:%d) has a cert without a valid nickname. Closing.",
            conn->address, conn->port);

Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.523
retrieving revision 1.524
diff -u -d -r1.523 -r1.524
--- or.h	12 Jan 2005 06:42:32 -0000	1.523
+++ or.h	13 Jan 2005 20:22:38 -0000	1.524
@@ -145,7 +145,6 @@
 #endif
 
 /** How often do we rotate onion keys? */
-#define OLD_MIN_ONION_KEY_LIFETIME (12*60*60) /* twice a day */
 #define MIN_ONION_KEY_LIFETIME (7*24*60*60) /* once a week */
 /** How often do we rotate TLS contexts? */
 #define MAX_SSL_KEY_LIFETIME (120*60)

Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -d -r1.205 -r1.206
--- routerlist.c	12 Jan 2005 04:58:23 -0000	1.205
+++ routerlist.c	13 Jan 2005 20:22:38 -0000	1.206
@@ -64,9 +64,8 @@
       log_fn(LOG_WARN, "Cached directory at '%s' was unparseable; ignoring.", filename);
     }
     if (routerlist &&
-        ((routerlist->published_on > time(NULL) - OLD_MIN_ONION_KEY_LIFETIME/2)
+        ((routerlist->published_on > time(NULL) - MIN_ONION_KEY_LIFETIME/2)
          || is_recent)) {
-      /* XXX use new onion key lifetime when 0.0.8 servers are obsolete */
       directory_has_arrived(st.st_mtime); /* do things we've been waiting to do */
     }
     tor_free(s);



More information about the tor-commits mailing list