1. 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;
  2. 16 Jan, 2019 1 commit
  3. 14 Nov, 2018 1 commit
  4. 01 Oct, 2018 2 commits
  5. 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.
  6. 25 Sep, 2018 3 commits
  7. 21 Sep, 2018 3 commits
  8. 19 Sep, 2018 1 commit
  9. 16 Sep, 2018 1 commit
  10. 10 Sep, 2018 1 commit
    • Taylor Yu's avatar
      Make control_event_bootstrap() return void · eee62e13
      Taylor Yu authored
      Simplify control_event_bootstrap() by making it return void again.  It
      is currently a fairly complicated function, and it's made more
      complicated by returning an int to signal whether it logged at NOTICE
      or INFO.
      The callers conditionally log messages at level NOTICE based on this
      return value.  Change the callers to unconditionally log their verbose
      human-readable messages at level INFO to keep NOTICE logs less
      This partially reverts the changes of #14950.
  11. 29 Aug, 2018 1 commit
    • David Goulet's avatar
      router: Keep RSA onion public key in ASN.1 format · 2f6bc749
      David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
      The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding
      which is 140 for a 1024 RSA key.
      We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor
      (microdesc_t). Scaling this to 6000 relays, and considering client usually
      only have microdescriptors, we save 1.608 MB of RAM which is considerable for
      mobile client.
      This commit makes it that we keep the RSA onion public key (used for TAP
      handshake) in ASN.1 format instead of an OpenSSL RSA object.
      Changes is done in both routerinfo_t and microdesc_t.
      Closes #27246
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  12. 28 Aug, 2018 1 commit
  13. 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.
    • 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.
  14. 03 Jul, 2018 1 commit
  15. 21 Jun, 2018 1 commit
  16. 20 Jun, 2018 2 commits
  17. 15 Jun, 2018 9 commits
  18. 22 May, 2018 1 commit
  19. 09 May, 2018 2 commits
    • Nick Mathewson's avatar
      Fix some clang warnings · 15ce5a3e
      Nick Mathewson authored
    • Nick Mathewson's avatar
      Distinguish true clock jumps from idleness · 285e7c98
      Nick Mathewson authored
      Since we're going to be disabling the second-elapsed callback, we're
      going to sometimes have long periods when no events file, and so the
      current second is not updated.  Handle that by having a better means
      to detect "clock jumps" as opposed to "being idle for a while".
      Tolerate far more of the latter.
      Part of #26009.
  20. 01 May, 2018 5 commits