[tor-commits] [tor/master] Misc trivial improvements around circpadding code.

nickm at torproject.org nickm at torproject.org
Mon Jan 14 19:50:35 UTC 2019


commit 2b29bccb8553c4b80eccd3438b4b1463687b1d4c
Author: George Kadianakis <desnacked at riseup.net>
Date:   Thu Jan 10 13:05:05 2019 +0200

    Misc trivial improvements around circpadding code.
---
 doc/tor.1.txt                | 5 +++++
 src/core/or/circuitpadding.c | 1 +
 src/core/or/relay.c          | 1 +
 3 files changed, 7 insertions(+)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index 455356163..6dbd4af37 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -1026,6 +1026,11 @@ The following options are useful only for clients (that is, if
     Normal circuits include all circuits except for direct connections
     to directory servers. Middle hops are all hops other than exit and entry. +
 +
+    This is an **experimental** feature that is meant to be used by researchers
+    and developers to test new features in the Tor network safely. Using it
+    without care will strongly influence your anonymity. This feature might get
+    removed in the future.
++
     The HSLayer2Node and HSLayer3Node options override this option for onion
     service circuits, if they are set. The vanguards addon will read this
     option, and if set, it will set HSLayer2Nodes and HSLayer3Nodes to nodes
diff --git a/src/core/or/circuitpadding.c b/src/core/or/circuitpadding.c
index 6f10d3fb6..6a39a7b37 100644
--- a/src/core/or/circuitpadding.c
+++ b/src/core/or/circuitpadding.c
@@ -304,6 +304,7 @@ circpad_histogram_usec_to_bin(const circpad_machine_state_t *mi,
   else
     start_usec = state->start_usec;
 
+  /* The first bin (#0) has zero width and starts (and ends) at start_usec. */
   if (usec <= start_usec)
     return 0;
 
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index 9c0f3bbbe..00c211195 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -527,6 +527,7 @@ relay_command_to_string(uint8_t command)
     case RELAY_COMMAND_EXTEND2: return "EXTEND2";
     case RELAY_COMMAND_EXTENDED2: return "EXTENDED2";
     case RELAY_COMMAND_PADDING_NEGOTIATE: return "PADDING_NEGOTIATE";
+    case RELAY_COMMAND_PADDING_NEGOTIATED: return "PADDING_NEGOTIATED";
     default:
       tor_snprintf(buf, sizeof(buf), "Unrecognized relay command %u",
                    (unsigned)command);





More information about the tor-commits mailing list