1. 07 May, 2021 1 commit
    • Nick Mathewson's avatar
      Reindent a few lines to fix a GCC warning. · e2c1ac21
      Nick Mathewson authored
      As of GCC 11.1.1, the compiler warns us about code like this:
      
           if (a)
               b;
               c;
      
      and that's a good thing: we wouldn't want to "goto fail".  But we
      had an instance if this in circuituse.c, which was making our
      compilation sad.
      
      Fixes bug 40380; bugfix on 0.3.0.1-alpha.
      e2c1ac21
  2. 06 May, 2020 1 commit
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · cc397449
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      cc397449
  3. 05 Jun, 2019 1 commit
    • Mike Perry's avatar
      Bug 29034: Cleanup hs circuitmap when purpose changes. · a6399da5
      Mike Perry authored
      Leave the other rend and hs_ident data around until circuit free, since code
      may still try to inspect it after marking the circuit for close. The
      circuitmap is the important thing to clean up, since repurposed
      intropoints must be removed from this map to ensure validity.
      a6399da5
  4. 19 Feb, 2019 1 commit
  5. 16 Jan, 2019 1 commit
  6. 04 Dec, 2018 1 commit
  7. 27 Sep, 2018 1 commit
    • Nick Mathewson's avatar
      Move the predicted ports code out of rephist.c · 241c1505
      Nick Mathewson authored
      It differs from the rest of the rephist code in that it's actually
      necessary for Tor to operate, so it should probably go somewhere
      else.  I'm not sure where yet, so I'll leave it in the same
      directory, but give it its own file.
      241c1505
  8. 25 Sep, 2018 3 commits
  9. 21 Sep, 2018 1 commit
  10. 28 Aug, 2018 3 commits
  11. 05 Jul, 2018 2 commits
    • Nick Mathewson's avatar
      Fix every include path changed in the previous commit (automated) · ef486e3c
      Nick Mathewson authored
      I am very glad to have written this script.
      ef486e3c
    • Nick Mathewson's avatar
      Move literally everything out of src/or · 63b4ea22
      Nick Mathewson authored
      This commit won't build yet -- it just puts everything in a slightly
      more logical place.
      
      The reasoning here is that "src/core" will hold the stuff that every (or
      nearly every) tor instance will need in order to do onion routing.
      Other features (including some necessary ones) will live in
      "src/feature".  The "src/app" directory will hold the stuff needed
      to have Tor be an application you can actually run.
      
      This commit DOES NOT refactor the former contents of src/or into a
      logical set of acyclic libraries, or change any code at all.  That
      will have to come in the future.
      
      We will continue to move things around and split them in the future,
      but I hope this lays a reasonable groundwork for doing so.
      63b4ea22
  12. 03 Jul, 2018 1 commit
  13. 28 Jun, 2018 2 commits
  14. 20 Jun, 2018 2 commits
  15. 15 Jun, 2018 6 commits
  16. 09 May, 2018 1 commit
    • Mike Perry's avatar
      Bug 25903: Perform accounting for new CIRC_BW fields. · e07e95ed
      Mike Perry authored
      Two new values in each direction. DELIVERED counts valid end-to-end circuit
      data that is accepted by our end and OVERHEAD counts the slack unused data in
      each of the relay command cells for those accepted cells.
      
      Control port changes are in the next commit.
      e07e95ed
  17. 01 May, 2018 1 commit
  18. 22 Apr, 2018 1 commit
    • Nick Mathewson's avatar
      Check for "the right descriptor", not just "any descriptor". · 948dd2c7
      Nick Mathewson authored
      This patch adds a new node_has_preferred_descriptor() function, and
      replaces most users of node_has_descriptor() with it.  That's an
      important change, since as of d1874b43 (our fix for #25213),
      we are willing to say that a node has _some_ descriptor, but not the
      _right_ descriptor for a particular use case.
      
      Part of a fix for 25691 and 25692.
      948dd2c7
  19. 11 Apr, 2018 1 commit
  20. 20 Feb, 2018 1 commit
    • Nick Mathewson's avatar
      Remove a bunch of other redundant #includes · 4438ef32
      Nick Mathewson authored
      Folks have found two in the past week or so; we may as well fix the
      others.
      
      Found with:
      
      \#!/usr/bin/python3
      import re
      
      def findMulti(fname):
          includes = set()
          with open(fname) as f:
              for line in f:
                  m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line)
                  if m:
                      inc = m.group(1)
                      if inc in includes:
                          print("{}: {}".format(fname, inc))
                      includes.add(m.group(1))
      
      import sys
      for fname in sys.argv[1:]:
          findMulti(fname)
      4438ef32
  21. 07 Feb, 2018 1 commit
  22. 05 Feb, 2018 1 commit
  23. 01 Feb, 2018 1 commit
    • 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
  24. 31 Jan, 2018 1 commit
  25. 26 Jan, 2018 1 commit
  26. 24 Jan, 2018 1 commit
  27. 23 Jan, 2018 1 commit
  28. 20 Jan, 2018 1 commit