1. 06 May, 2020 2 commits
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 79ff2b6a
      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;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.1 version.)
      79ff2b6a
    • 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
  2. 16 Jan, 2019 2 commits
  3. 21 Sep, 2018 1 commit
  4. 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
  5. 01 Jul, 2018 2 commits
  6. 21 Jun, 2018 1 commit
  7. 20 Jun, 2018 2 commits
  8. 15 Jun, 2018 3 commits
  9. 06 Apr, 2018 1 commit
  10. 16 Feb, 2018 1 commit
  11. 05 Feb, 2018 1 commit
  12. 08 Dec, 2017 1 commit
  13. 04 Aug, 2017 1 commit
    • Nick Mathewson's avatar
      Fix ntohs() that should have been htons() · 3b646bf8
      Nick Mathewson authored
      Fixes bug 23106; bugfix on 0.2.4.8-alpha.
      
      Fortunately, we only support big-endian and little-endian platforms,
      and on both of those, hton*() and ntoh*() behave the same.  And if
      we did start to support middle endian systems (haha, no), most of
      _those_ have hton*(x) == ntoh*(x) too.
      3b646bf8
  14. 15 Mar, 2017 2 commits
  15. 08 Dec, 2016 2 commits
  16. 11 Nov, 2016 1 commit
  17. 17 Oct, 2016 1 commit
    • Nick Mathewson's avatar
      Write a bunch of module documentation. · aae034d1
      Nick Mathewson authored
      This commit adds or improves the module-level documenation for:
      
        buffers.c circuitstats.c command.c connection_edge.c control.c
        cpuworker.c crypto_curve25519.c crypto_curve25519.h
        crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c
        dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c
        onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c
        protover.c protover.h reasons.c rephist.c replaycache.c
        routerlist.c routerparse.c routerset.c statefile.c status.c
        tor_main.c workqueue.c
      
      In particular, I've tried to explain (for each documented module)
      what each module does, what's in it, what the big idea is, why it
      belongs in Tor, and who calls it.  In a few cases, I've added TODO
      notes about refactoring opportunities.
      
      I've also renamed an argument, and fixed a few DOCDOC comments.
      aae034d1
  18. 24 Aug, 2016 1 commit
  19. 06 Jul, 2016 1 commit
  20. 12 Jun, 2016 1 commit
  21. 11 Jun, 2016 1 commit
    • Nick Mathewson's avatar
      Add -Wmissing-variable-declarations, with attendant fixes · 53a3b39d
      Nick Mathewson authored
      This is a big-ish patch, but it's very straightforward.  Under this
      clang warning, we're not actually allowed to have a global variable
      without a previous extern declaration for it.  The cases where we
      violated this rule fall into three roughly equal groups:
        * Stuff that should have been static.
        * Stuff that was global but where the extern was local to some
          other C file.
        * Stuff that was only global when built for the unit tests, that
          needed a conditional extern in the headers.
      
      The first two were IMO genuine problems; the last is a wart of how
      we build tests.
      53a3b39d
  22. 30 May, 2016 1 commit
    • Nick Mathewson's avatar
      Replace nearly all XXX0vv comments with smarter ones · 4f1a04ff
      Nick Mathewson authored
      So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we
      had better revisit this comment and fix it!"
      
      But we have a huge pile of such comments accumulated for a large
      number of released versions!  Not cool.
      
      So, here's what I tried to do:
      
        * 0.2.9 and 0.2.8 are retained, since those are not yet released.
      
        * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks
          quite important!"
      
        * The others, after one-by-one examination, are downgraded to
          plain old XXX.  Which doesn't mean they aren't a problem -- just
          that they cannot possibly be a release-blocking problem.
      4f1a04ff
  23. 29 Mar, 2016 1 commit
  24. 27 Feb, 2016 1 commit
  25. 14 Jan, 2015 1 commit
  26. 02 Jan, 2015 1 commit
  27. 28 Oct, 2014 1 commit
  28. 27 Oct, 2014 1 commit
    • Sebastian Hahn's avatar
      Remove configure option to disable curve25519 · 909aa51b
      Sebastian Hahn authored
      By now, support in the network is widespread and it's time to require
      more modern crypto on all Tor instances, whether they're clients or
      servers. By doing this early in 0.2.6, we can be sure that at some point
      all clients will have reasonable support.
      909aa51b
  29. 16 Oct, 2014 1 commit
    • Nick Mathewson's avatar
      Downgrade 'invalid result from curve25519 handshake: 4' warning · fb91d647
      Nick Mathewson authored
      Also, refactor the way we handle failed handshakes so that this
      warning doesn't propagate itself to "onion_skin_client_handshake
      failed" and "circuit_finish_handshake failed" and
      "connection_edge_process_relay_cell (at origin) failed."
      
      Resolves warning from 9635.
      fb91d647
  30. 19 Apr, 2014 1 commit
  31. 27 Mar, 2014 1 commit