Skip to content
Snippets Groups Projects
  1. Mar 17, 2018
  2. Feb 02, 2018
  3. Feb 01, 2018
    • Caio Valente's avatar
      refactor: rename connection_t struct fields. · 7884ce76
      Caio Valente authored
      connection_t.timestamp_lastwritten renamed to
      connection_t.timestamp_last_write_allowed
      
      connection_t.timestamp_lastread renamed to
      connection_t.timestamp_last_read_allowed
      
      Closes ticket 24714.
      7884ce76
  4. Jan 25, 2018
  5. Dec 21, 2017
  6. Dec 20, 2017
  7. Dec 08, 2017
    • Nick Mathewson's avatar
    • David Goulet's avatar
      chan: Do not re-queue after a fail cell write · 6120efd7
      David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
      
      Couple things happen in this commit. First, we do not re-queue a cell back in
      the circuit queue if the write packed cell failed. Currently, it is close to
      impossible to have it failed but just in case, the channel is mark as closed
      and we move on.
      
      The second thing is that the channel_write_packed_cell() always took ownership
      of the cell whatever the outcome. This means, on success or failure, it needs
      to free it.
      
      It turns out that that we were using the wrong free function in one case and
      not freeing it in an other possible code path. So, this commit makes sure we
      only free it in one place that is at the very end of
      channel_write_packed_cell() which is the top layer of the channel abstraction.
      This makes also channel_tls_write_packed_cell_method() return a negative value
      on error.
      
      Two unit tests had to be fixed (quite trivial) due to a double free of the
      packed cell in the test since now we do free it in all cases correctly.
      
      Part of #23709
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      6120efd7
  8. Nov 27, 2017
    • Nick Mathewson's avatar
      Add a new notion of "stamps" to be a fast 32-bit monotonic timestamp · c3c0a05f
      Nick Mathewson authored
      The goal here is to replace our use of msec-based timestamps with
      something less precise, but easier to calculate.  We're doing this
      because calculating lots of msec-based timestamps requires lots of
      64/32 division operations, which can be inefficient on 32-bit
      platforms.
      
      We make sure that these stamps can be calculated using only the
      coarse monotonic timer and 32-bit bitwise operations.
      c3c0a05f
  9. Nov 22, 2017
  10. Nov 04, 2017
  11. Sep 29, 2017
  12. Sep 15, 2017
  13. Sep 11, 2017
  14. Sep 07, 2017
  15. Sep 05, 2017
    • Nick Mathewson's avatar
      Add support for HTTP Connect tunnels · 4b30ae15
      Nick Mathewson authored
      4b30ae15
    • Nick Mathewson's avatar
      Refactor buffer APIs to put a buf_t first. · 6ec50597
      Nick Mathewson authored
      By convention, a function that frobs a foo_t should be called
      foo_frob, and it should have a foo_t * as its first argument.  But
      for many of the buf_t functions, the buf_t was the final argument,
      which is silly.
      6ec50597
    • Nick Mathewson's avatar
      Repair buffer API so everything starts with buf_. · 4a7e90ad
      Nick Mathewson authored
      Our convention is that functions which manipulate a type T should be
      named T_foo.  But the buffer functions were super old, and followed
      all kinds of conventions.  Now they're uniform.
      
      Here's the perl I used to do this:
      
      \#!/usr/bin/perl -w -i -p
      
      s/read_to_buf\(/buf_read_from_socket\(/;
      s/flush_buf\(/buf_flush_to_socket\(/;
      s/read_to_buf_tls\(/buf_read_from_tls\(/;
      s/flush_buf_tls\(/buf_flush_to_tls\(/;
      s/write_to_buf\(/buf_add\(/;
      s/write_to_buf_compress\(/buf_add_compress\(/;
      s/move_buf_to_buf\(/buf_move_to_buf\(/;
      s/peek_from_buf\(/buf_peek\(/;
      s/fetch_from_buf\(/buf_get_bytes\(/;
      s/fetch_from_buf_line\(/buf_get_line\(/;
      s/fetch_from_buf_line\(/buf_get_line\(/;
      s/buf_remove_from_front\(/buf_drain\(/;
      s/peek_buf_startswith\(/buf_peek_startswith\(/;
      s/assert_buf_ok\(/buf_assert_ok\(/;
      4a7e90ad
  16. Jun 19, 2017
  17. Jun 08, 2017
  18. May 30, 2017
  19. May 28, 2017
  20. May 08, 2017
    • Mike Perry's avatar
    • Mike Perry's avatar
      Netflow record collapsing defense. · b0e92634
      Mike Perry authored and Nick Mathewson's avatar Nick Mathewson committed
      This defense will cause Cisco, Juniper, Fortinet, and other routers operating
      in the default configuration to collapse netflow records that would normally
      be split due to the 15 second flow idle timeout.
      
      Collapsing these records should greatly reduce the utility of default netflow
      data for correlation attacks, since all client-side records should become 30
      minute chunks of total bytes sent/received, rather than creating multiple
      separate records for every webpage load/ssh command interaction/XMPP chat/whatever
      else happens to be inactive for more than 15 seconds.
      
      The defense adds consensus parameters to govern the range of timeout values
      for sending padding packets, as well as for keeping connections open.
      
      The defense only sends padding when connections are otherwise inactive, and it
      does not pad connections used solely for directory traffic at all. By default
      it also doesn't pad inter-relay connections.
      
      Statistics on the total padding in the last 24 hours are exported to the
      extra-info descriptors.
      b0e92634
  21. Apr 25, 2017
  22. Apr 05, 2017
    • David Goulet's avatar
      cell: Do not warn on hidden service invalid port · 0fdad78f
      David Goulet authored
      
      When a client tried to connect to an invalid port of an hidden service, a
      warning was printed:
      
        [warn] connection_edge_process_relay_cell (at origin) failed.
      
      This is because the connection subsystem wants to close the circuit because
      the port can't be found and then returns a negative reason to achieve that.
      However, that specific situation triggered a warning. This commit prevents it
      for the specific case of an invalid hidden service port.
      
      Fixes #16706
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      0fdad78f
  23. Mar 15, 2017
  24. Feb 16, 2017
  25. Jan 18, 2017
  26. Nov 04, 2016
  27. Nov 03, 2016
  28. Oct 27, 2016
Loading