1. 05 May, 2021 1 commit
  2. 12 Mar, 2021 1 commit
  3. 19 Feb, 2021 1 commit
  4. 12 Jan, 2021 1 commit
    • David Goulet's avatar
      hs-v3: Require reasonably live consensus · 04b02639
      David Goulet authored
      Some days before this commit, the network experienced a DDoS on the directory
      authorities that prevented them to generate a consensus for more than 5 hours
      That in turn entirely disabled onion service v3, client and service side, due
      to the subsystem requiring a live consensus to function properly.
      We know require a reasonably live consensus which means that the HSv3
      subsystem will to its job for using the best consensus tor can find. If the
      entire network is using an old consensus, than this should be alright.
      If the service happens to use a live consensus while a client is not, it
      should still work because the client will use the current SRV it sees which
      might be the previous SRV for the service for which it still publish
      descriptors for.
      If the service is using an old one and somehow can't get a new one while
      clients are on a new one, then reachability issues might arise. However, this
      is a situation we already have at the moment since the service will simply not
      work if it doesn't have a live consensus while a client has one.
      Fixes #40237
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  5. 12 Nov, 2020 1 commit
    • Samanta Navarro's avatar
      Fix typos. · 4a0cd795
      Samanta Navarro authored and David Goulet's avatar David Goulet committed
      Typos found with codespell.
      Please keep in mind that this should have impact on actual code
      and must be carefully evaluated:
      -    ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
  6. 14 Jul, 2020 1 commit
    • David Goulet's avatar
      addr: Use tor_addr_t instead of uint32_t for IPv4 · 15860c88
      David Goulet authored
      This changes a LOT of code but in the end, behavior is the same.
      Unfortunately, many functions had to be changed to accomodate but in majority
      of cases, to become simpler.
      Functions are also removed specifically those that were there to convert an
      IPv4 as a host format to a tor_addr_t. Those are not needed anymore.
      The IPv4 address field has been standardized to "ipv4_addr", the ORPort to
      "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport".
      This is related to Sponsor 55 work that adds IPv6 support for relays and this
      work is needed in order to have a common interface between IPv4 and IPv6.
      Closes #40043.
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  7. 08 Jul, 2020 1 commit
    • Guinness's avatar
      socks: Returns 0xF6 only if BAD_HOSTNAME · 562957e0
      Guinness authored and David Goulet's avatar David Goulet committed
      This commit modifies the behavior of `parse_extended_address` in such a way
      that if it fails, it will always return a `BAD_HOSTNAME` value, which is then
      used to return the 0xF6 extended error code.  This way, in any case that is
      not a valid v2 address, we return the 0xF6 error code, which is the expected
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  8. 24 Feb, 2020 2 commits
  9. 21 Jan, 2020 1 commit
  10. 08 Jan, 2020 1 commit
  11. 18 Nov, 2019 1 commit
    • David Goulet's avatar
      hs-v3: Set extended error if .onion is invalid · 80f24190
      David Goulet authored
      In order to achieve this, the parse_extended_hostname() had to be refactored
      to return either success or failure and setting the hostname type in the given
      The reason for that is so it can detect invalid onion addresses that is having
      a ".onion", the right length but just not passing validation.
      That way, we can send back the prop304 ExtendedError "X'F1' Onion Service
      Descriptor Is Invalid" to notify the SOCKS connection of the invalid onion
      Part of #30382
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  12. 05 Sep, 2019 1 commit
  13. 28 Jun, 2019 1 commit
    • Nick Mathewson's avatar
      Coverity: fix test issues with always-present 'service' var. · 5fa2b322
      Nick Mathewson authored
      Coverity is worried that we check "service" at the end of these test
      functions, since it doesn't see any way to reach the cleanup code
      without having first dereferenced the variable.
      Removing the check would be unwise in this case: instead we add a
      tt_assert check before using "service" so that coverity thinks that
      the check is doing something useful.
      Bugfix on
  14. 16 May, 2019 1 commit
  15. 26 Apr, 2019 1 commit
  16. 16 Jan, 2019 2 commits
  17. 22 Nov, 2018 1 commit
  18. 21 Sep, 2018 1 commit
  19. 07 Sep, 2018 1 commit
  20. 17 Jul, 2018 2 commits
    • George Kadianakis's avatar
      Fix time source bug in sr_state_get_start_time_of_current_protocol_run(). · 9e6235d2
      George Kadianakis authored and Nick Mathewson's avatar Nick Mathewson committed
      The following bug was causing many issues for this branch in chutney:
      In sr_state_get_start_time_of_current_protocol_run() we were using the
      consensus valid-after to calculate beginning_of_current_round, but we were
      using time(NULL) to calculate the current_round slot. This was causing time
      sync issues when the consensus valid-after and time(NULL) were disagreeing on
      what the current round is. Our fix is to use the consensus valid-after in both
      This also means that we are not using 'now' (aka time(NULL)) anymore in that
      function, and hence we can remove that argument from the function (and its
      callers). I'll do this in the next commit so that we keep things separated.
      Furthermore, we fix a unittest that broke.
    • George Kadianakis's avatar
      Fix up some unittests by being more careful with the local time. · 2e8d4139
      George Kadianakis authored and Nick Mathewson's avatar Nick Mathewson committed
      Now that the rev counter depends on the local time, we need to be more careful
      in the unittests. Some unittests were breaking because they were using
      consensus values from 1985, but they were not updating the local time
      appropriately. That was causing the OPE module to complain that it was trying
      to encrypt insanely large values.
  21. 05 Jul, 2018 2 commits
  22. 01 Jul, 2018 2 commits
  23. 23 Jun, 2018 1 commit
  24. 21 Jun, 2018 1 commit
  25. 20 Jun, 2018 2 commits
  26. 15 Jun, 2018 5 commits
  27. 02 May, 2018 1 commit
    • Nick Mathewson's avatar
      Make hs_get_responsible_hsdirs() deterministic. · e386d61c
      Nick Mathewson authored
      This test was using the current time to pick the time period number,
      and a randomly generated hs key.  Therefore, it sometimes picked an
      index that would wrap around the example dht, and sometimes would
      The fix here is just to fix the time period and the public key.
      Fixes bug 25997; bugfix on
  28. 01 May, 2018 1 commit
  29. 27 Apr, 2018 1 commit
    • David Goulet's avatar
      mod: Move dirauth specific files to its own module · 2115a54b
      David Goulet authored
      This is a pretty big commit but it only moves these files to src/or/dirauth:
        dircollate.c dirvote.c shared_random.c shared_random_state.c
        dircollate.h dirvote.h shared_random.h shared_random_state.h
      Then many files are modified to change the include line for those header files
      that have moved into a new directory.
      Without using --disable-module-dirauth, everything builds fine. When using the
      flag to disable the module, tor doesn't build due to linking errors. This will
      be addressed in the next commit(s).
      No code behavior change.
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  30. 22 Apr, 2018 1 commit