Skip to content
Snippets Groups Projects
  1. Nov 17, 2020
    • David Goulet's avatar
      config: Really ignore non ORPorts when removing duplicates · d04a27be
      David Goulet authored
      
      The function in charge of removing duplicate ORPorts from our configured ports
      was skipping all non ORPorts port but only for the outer loop thus resulting
      in comparing an ORPort with a non-ORPort which lead to problems.
      
      For example, tor configured with the following would fail:
      
        ORPort auto
        DirPort auto
      
      Both end up being the same configuration except that one is a OR listener and
      one is a Dir listener. Thus because of the missing check in the inner loop,
      they looked exactly the same and thus one is removed.
      
      Fixes #40195
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      d04a27be
    • David Goulet's avatar
      relay: Launch dummy circuit only when descriptor build fails · bc5f26ff
      David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
      
      First, this commit moves the launch_dummy_circuit_as_needed() function into
      relay_find_addr.c and renames it to relay_addr_learn_from_dirauth(). This is
      an attempt to centralize anything relate with address discovery in the right
      module.
      
      Second, when building a descriptor and we fail to discover our address,
      immediately launch a dummy circuit to an authority in an attempt to learn our
      descriptor.
      
      It is still only done every 20 minutes even though the descriptor build is
      done every minute. We ought to avoid load on the authority and if we can't
      learn in the first place our address from them, chances are more things are
      wrong.
      
      Related to #40071
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      bc5f26ff
    • David Goulet's avatar
      relay: Look at our cache when looking for an IP change · a5538a36
      David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
      
      Regularly, tor looks if its IP has changed. It does the entire auto discovery
      process again. However, it is possible that it does not find anything.
      
      Instead of thinking the IP changed to an unknown address, look at our cache
      and see if that value has changed.
      
      The reason for this is because if tor gets its address as a suggestion from a
      directory authority, it is because the auto discovery failed and thus that
      address should be consider for the IP change check.
      
      Related to #40071
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      a5538a36
    • David Goulet's avatar
      relay: Use testing circuit instead of dummy descriptor fetch · 4b981407
      David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
      
      Tor now can learn its address from a NETINFO cell coming from an authority.
      Thus, instead from launching a dummy descriptor fetch to learn the address
      from the directory response (unauthenticated), we simply now launch a one-hop
      testing circuit.
      
      Related to #40071
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      4b981407
  2. Nov 13, 2020
    • David Goulet's avatar
      port: Don't ignore ports of a different family · d425dbf0
      David Goulet authored
      
      Commit c3a0f757 added this feature for ORPort
      that we ignore any port that is not the family of our default address when
      parsing the port. So if port_parse_config() was called with an IPv4 default
      address, all IPv6 address would be ignored.
      
      That makes sense for ORPort since we call twice port_parse_config() for
      0.0.0.0 and [::] but for the rest of the ports, it is not good since a
      perfectly valid configuration can be:
      
        SocksPort 9050
        SocksPort [::1]:9050
      
      Any non-ORPort only binds by default to an IPv4 except the ORPort that binds
      to both IPv4 and IPv6 by default.
      
      The fix here is to always parse all ports within port_parse_config() and then,
      specifically for ORPort, remove the duplicates or superseding ones. The
      warning is only emitted when a port supersedes another.
      
      A unit tests is added to make sure SocksPort of different family always exists
      together.
      
      Fixes #40183
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      d425dbf0
  3. Nov 12, 2020
    • 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:
      
      src/core/or/lttng_circuit.inc
      -    ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
      +    ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
      4a0cd795
  4. Oct 28, 2020
  5. Oct 27, 2020
  6. Oct 23, 2020
    • Nick Mathewson's avatar
      Update required/recommended protocol lists more systematically · fd58e74d
      Nick Mathewson authored
      First I began with a set of candidates:
      
        The client's _required_ list starts with all the protocols
        supported by every release in 0.2.9-stable through current
        master.
      
        The client's _required_ list starts with all the protocols
        supported by every release in 0.3.5-stable through current
        master.
      
        Everybody's _recommended_ list starts with all the protocols
        supported by every release in 0.3.5-stable through current master.
      
      Then I removed the protocol versions that we do not actually want to
      require or recommend:
      
        DirCache=1 (deprecated)
        HSDir=1, HSIntro=1-3, HSRend=1 (deprecated)
        (All HS* protocol requirements for clients)
        Link=1-3 (deprecated)
        LinkAuth=1 (obsolete)
        Relay=1 (obsolete)
      fd58e74d
  7. Oct 22, 2020
    • Roger Dingledine's avatar
      Turn ConsensusParams into a Linelist · 00118355
      Roger Dingledine authored
      Make it possible to specify multiple ConsensusParams torrc
      lines.
      
      Now directory authority operators can for example put the
      main ConsensusParams config in one torrc file and then add to it
      from a different torrc file.
      
      Closes ticket 40164.
      00118355
  8. Oct 21, 2020
  9. Oct 20, 2020
  10. Oct 19, 2020
  11. Oct 18, 2020
    • Nick Mathewson's avatar
      Update required/recommended protocol versions. · d872c692
      Nick Mathewson authored
        Cons=1 is the old format of consensuses, without ed25519 keys. It
        is no longer required or recommended.
      
        Cons=2 is the new format of consensuses, with ed25519 keys. It
        is now required.
      
        (Similarly for Desc=1,2 and Microdesc=1,2)
      
      No supported client or relay versions should be affected by this
      change, since these versions are supported by clients and relays
      running 0.2.9 and later.  It will only take effect once enough
      authorities vote for it.
      
      Closes ticket 40162.
      d872c692
    • Nick Mathewson's avatar
      Split required/recommended protocol lists into multiple lines · 4298d877
      Nick Mathewson authored
      This should make diffs easier to read.
      4298d877
  12. Oct 16, 2020
    • Nick Mathewson's avatar
      Fix up vote tests in test_dir_handle_get. · acf42254
      Nick Mathewson authored
      These tests used a hardcoded vote with a hardcoded digest.  That
      vote didn't have any pr lines, and so it is now invalid. I've
      adjusted the testing code so that it mocks the signature-checking,
      so that we can more easily change the contents of the vote.
      acf42254
  13. Oct 15, 2020
  14. Oct 08, 2020
  15. Oct 07, 2020
  16. Oct 06, 2020
    • Alexander Hansen Færøy's avatar
      Expose TOR_PT_OUTBOUND_BIND_ADDRESS_{V4,V6} to Pluggable Transports. · 5f61e19d
      Alexander Hansen Færøy authored and David Goulet's avatar David Goulet committed
      This patch adds support for exposing the environment variables
      `TOR_PT_OUTBOUND_BIND_ADDRESS_V4` and `TOR_PT_OUTBOUND_BIND_ADDRESS_V6` to
      Pluggable Transport proccesses. These two values will contain the IPv4
      and IPv6 address that the user have specified in torrc that they wish
      the PT to use for all outgoing IP packets.
      
      It is important to note here that it is up to the indvidual Pluggable
      Transport if they are willing to honor these values or ignore them
      completely.
      
      One can test this feature using the following dummy PT written in POSIX
      shell script:
      
          #!/bin/sh
      
          echo "LOG SEVERITY=warning MESSAGE=\"Value for IPv4: ${TOR_PT_OUTBOUND_BIND_ADDRESS_V4}\""
          echo "LOG SEVERITY=warning MESSAGE=\"Value for IPv6: ${TOR_PT_OUTBOUND_BIND_ADDRESS_V6}\""
      
          while true ; do
              sleep 1
          done
      
      with the following entries in your torrc:
      
          OutboundBindAddressPT 203.0.113.4
          OutboundBindAddress 203.0.113.5
          OutboundBindAddressPT 2001:db8::4
          OutboundBindAddress 2001:db8::5
      
      See: https://bugs.torproject.org/5304
      5f61e19d
  17. Oct 01, 2020
  18. Sep 28, 2020
  19. Sep 23, 2020
Loading