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

[tor-commits] [tor/master] get rid of routerstatus->version_supports_optimistic_data



commit bbfb1aca55303c150ebb08e223a0d9a69bb5be26
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date:   Sun Sep 21 19:04:18 2014 -0400

    get rid of routerstatus->version_supports_optimistic_data
    
    Clients are now willing to send optimistic circuit data (before they
    receive a 'connected' cell) to relays of any version. We used to
    only do it for relays running 0.2.3.1-alpha or later, but now all
    relays are new enough.
    
    Resolves ticket 13153.
---
 changes/feature13153 |    5 +++++
 src/or/circuituse.c  |    3 +--
 src/or/or.h          |    3 ---
 src/or/routerparse.c |    3 ---
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/changes/feature13153 b/changes/feature13153
new file mode 100644
index 0000000..15f8fe8
--- /dev/null
+++ b/changes/feature13153
@@ -0,0 +1,5 @@
+  o Code simplication:
+    - Clients are now willing to send optimistic circuit data (before they
+      receive a 'connected' cell) to relays of any version. We used to
+      only do it for relays running 0.2.3.1-alpha or later, but now all
+      relays are new enough. Resolves ticket 13153.
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index bd42bd3..cb2d7e2 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -2110,8 +2110,7 @@ link_apconn_to_circ(entry_connection_t *apconn, origin_circuit_t *circ,
       exitnode->rs) {
     /* Okay; we know what exit node this is. */
     if (optimistic_data_enabled() &&
-        circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL &&
-        exitnode->rs->version_supports_optimistic_data)
+        circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL)
       apconn->may_use_optimistic_data = 1;
     else
       apconn->may_use_optimistic_data = 0;
diff --git a/src/or/or.h b/src/or/or.h
index ba7eeea..b2b0d5f 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2149,9 +2149,6 @@ typedef struct routerstatus_t {
   /** True iff this router is a version that, if it caches directory info,
    * we can get microdescriptors from. */
   unsigned int version_supports_microdesc_cache:1;
-  /** True iff this router is a version that allows DATA cells to arrive on
-   * a stream before it has sent a CONNECTED cell. */
-  unsigned int version_supports_optimistic_data:1;
   /** True iff this router has a version that allows it to accept EXTEND2
    * cells */
   unsigned int version_supports_extend2_cells:1;
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 281341d..250d1cd 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1916,12 +1916,9 @@ routerstatus_parse_entry_from_string(memarea_t *area,
     rs->version_known = 1;
     if (strcmpstart(tok->args[0], "Tor ")) {
       rs->version_supports_microdesc_cache = 1;
-      rs->version_supports_optimistic_data = 1;
     } else {
       rs->version_supports_microdesc_cache =
         tor_version_supports_microdescriptors(tok->args[0]);
-      rs->version_supports_optimistic_data =
-        tor_version_as_new_as(tok->args[0], "0.2.3.1-alpha");
       rs->version_supports_extend2_cells =
         tor_version_as_new_as(tok->args[0], "0.2.4.8-alpha");
     }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits