Skip to content
Snippets Groups Projects
  1. Sep 05, 2012
  2. Aug 23, 2012
    • Linus Nordberg's avatar
      Move ipv6_preferred from routerinfo_t to node_t. · 3410a46e
      Linus Nordberg authored
      Move extend_info_from_router() from circuitbuild.c to router.c and
      make it static.
      
      Add get_configured_bridge_by_orports_digest() and have
      get_configured_bridge_by_routerinfo() and
      node_is_a_configured_bridge() use it. We now consider all OR ports of
      a bridge when looking for it.
      
      Move node_get_*_orport to nodelist.c.
      
      Fix a cut'n'paste error in header of nodelist.h.
      
      Add node_assert_ok().
      
      Add router_get_all_orports(). It's duplicating code from
      node_get_all_orports(). Worth fixing at the cost of complicating the
      API slightly?
      3410a46e
  3. Jul 19, 2012
    • Nick Mathewson's avatar
      Avoid double-typedef of transport_t. · 24451e6f
      Nick Mathewson authored
      You can say "struct foo_t" as much as you want, but you'd better not
      have "typedef struct foo_t foo_t" more than once.
      
      Fix for bug 6416.  Bug not in any released version of Tor.
      24451e6f
  4. Jul 12, 2012
    • George Kadianakis's avatar
      Address Nick's comments. · 8b9f4d75
      George Kadianakis authored
      - Add a changes/ file.
      - Make it compile under --enable-gcc-warnings.
      - Update the file-level documentation of src/or/transports.c.
      - Only update descriptor if at least a managed proxy was configured.
      - Add our external IP address to the extra-info descriptor instead of 0.0.0.0.
      8b9f4d75
  5. Jul 03, 2012
  6. Jun 14, 2012
  7. Jun 13, 2012
  8. Jun 05, 2012
  9. Jun 04, 2012
    • Nick Mathewson's avatar
      Add about 60 more DOCDOC comments to 0.2.3 · 173b18c7
      Nick Mathewson authored
      Also, try to resolve some doxygen issues.  First, define a magic
      "This is doxygen!" macro so that we take the correct branch in
      various #if/#else/#endifs in order to get the right documentation.
      Second, add in a few grouping @{ and @} entries in order to get some
      variables and fields to get grouped together.
      173b18c7
  10. May 18, 2012
  11. Jan 25, 2012
    • Roger Dingledine's avatar
      Allow 0.2.3.x clients to use 0.2.2.x bridges. · a0f08977
      Roger Dingledine authored
      Previously the client would ask the bridge for microdescriptors, which are
      only supported in 0.2.3.x and later, and then fail to bootstrap when it
      didn't get the answers it wanted. Fixes bug 4013; bugfix on 0.2.3.2-alpha.
      
      The fix here is to revert to using normal descriptors if any of our
      bridges are known to not support microdescs. This is not ideal, a) because
      we'll start downloading a microdesc consensus as soon as we get a bridge
      descriptor, and that will waste time if we later get a bridge descriptor
      that tells us we don't like microdescriptors; and b) by changing our mind
      we're leaking to our other bridges that we have an old-version bridge.
      
      The alternate fix would have been to change
      we_use_microdescriptors_for_circuits() to ask if *any* of our bridges
      can support microdescriptors, and then change the directory logic that
      picks a bridge to only select from those that do. For people living in
      the future, where 0.2.2.x is obsolete, there won't be a difference.
      
      Note that in either of these potential fixes, we have risk of oscillation
      if our one funny-looking bridges goes away / comes back.
      a0f08977
  12. Jan 18, 2012
    • Nick Mathewson's avatar
      Rename nonconformant identifiers. · 26e789fb
      Nick Mathewson authored
      Fixes bug 4893.
      
      These changes are pure mechanical, and were generated with this
      perl script:
      
        /usr/bin/perl -w -i.bak -p
      
        s/crypto_pk_env_t/crypto_pk_t/g;
        s/crypto_dh_env_t/crypto_dh_t/g;
        s/crypto_cipher_env_t/crypto_cipher_t/g;
        s/crypto_digest_env_t/crypto_digest_t/g;
      
        s/aes_free_cipher/aes_cipher_free/g;
        s/crypto_free_cipher_env/crypto_cipher_free/g;
        s/crypto_free_digest_env/crypto_digest_free/g;
        s/crypto_free_pk_env/crypto_pk_free/g;
      
        s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g;
        s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g;
        s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g;
        s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g;
      
        s/crypto_new_cipher_env/crypto_cipher_new/g;
        s/crypto_new_digest_env/crypto_digest_new/g;
        s/crypto_new_digest256_env/crypto_digest256_new/g;
        s/crypto_new_pk_env/crypto_pk_new/g;
      
        s/crypto_create_crypto_env/crypto_cipher_new/g;
      
        s/connection_create_listener/connection_listener_new/g;
        s/smartlist_create/smartlist_new/g;
        s/transport_create/transport_new/g;
      26e789fb
  13. Nov 30, 2011
    • Linus Nordberg's avatar
      First chunk of support for bridges on IPv6 · f786307a
      Linus Nordberg authored and Nick Mathewson's avatar Nick Mathewson committed
      Comments below focus on changes, see diff for added code.
      
      New type tor_addr_port_t holding an IP address and a TCP/UDP port.
      
      New flag in routerinfo_t, ipv6_preferred.  This should go in the
      node_t instead but not now.
      
      Replace node_get_addr() with
      - node_get_prim_addr() for primary address, i.e. IPv4 for now
      - node_get_pref_addr() for preferred address, IPv4 or IPv6.
      
      Rename node_get_addr_ipv4h() node_get_prim_addr_ipv4h() for
      consistency.  The primary address will not allways be an IPv4 address.
      Same for node_get_orport() -> node_get_prim_orport().
      
      Rewrite node_is_a_configured_bridge() to take all OR ports into account.
      
      Extend argument list to extend_info_from_node and
      extend_info_from_router with a flag indicating if we want to use the
      routers primary address or the preferred address.  Use the preferred
      address in as few situtations as possible for allowing clients to
      connect to bridges over IPv6.
      f786307a
  14. Sep 11, 2011
    • George Kadianakis's avatar
      Don't warn of stray Bridges if managed proxies are still unconfigured. · d0416ce3
      George Kadianakis authored
      With managed proxies you would always get the error message:
      
      "You have a Bridge line using the X pluggable transport, but there
      doesn't seem to be a corresponding ClientTransportPlugin line."
      
      because the check happened directly after parse_client_transport_line()
      when managed proxies were not fully configured and their transports
      were not registered.
      
      The fix is to move the validation to run_scheduled_events() and make
      sure that all managed proxies are configured first.
      d0416ce3
    • George Kadianakis's avatar
      Prepare circuitbuild.[ch] and config.[ch] for SIGHUPs. · fa514fb2
      George Kadianakis authored
      * Create mark/sweep functions for transports.
      * Create a transport_resolve_conflicts() function that tries to
        resolve conflicts when registering transports.
      fa514fb2
  15. Jul 13, 2011
    • George Kadianakis's avatar
      Put some last missing pieces together. · 5492de76
      George Kadianakis authored
      * Add some utility transport functions in circuitbuild.[ch] so that we
        can use them from pt.c.
      * Make the accounting system consider traffic coming from proxies.
      * Make sure that we only fetch bridge descriptors when all the
        transports are configured.
      5492de76
  16. Jul 03, 2011
  17. Jun 22, 2011
    • George Kadianakis's avatar
      Revised how we handle ClientTransportPlugin and Bridge lines. · 1fe8bee6
      George Kadianakis authored
      Multiple Bridge lines can point to the same one ClientTransportPlugin
      line, and we can have multiple ClientTransportPlugin lines in our
      configuration file that don't match with a bridge. We also issue a
      warning when we have a Bridge line with a pluggable transport but we
      can't match it to a ClientTransportPlugin line.
      1fe8bee6
  18. Jun 21, 2011
    • George Kadianakis's avatar
      Fixes on circuitbuild.[ch] based on nick's comments. · 392e947d
      George Kadianakis authored
      * Renamed transport_info_t to transport_t.
      * Introduced transport_get_by_name().
      * Killed match_bridges_with_transports().
        We currently *don't* detect whether any bridges miss their transports,
        of if any transports miss their bridges.
      * Various code and aesthetic tweaks and English language changes.
      392e947d
  19. Jun 14, 2011
  20. Jun 12, 2011
    • George Kadianakis's avatar
      Various trivial changes. · 00ec4b2c
      George Kadianakis authored
      * Improved function documentation.
      * Renamed find_bridge_transport_by_addrport() to
        find_transport_by_bridge_addrport().
      * Sanitized log severities we use.
      * Ran check-spaces.
      00ec4b2c
  21. Jun 11, 2011
  22. May 16, 2011
    • Nick Mathewson's avatar
      Preserve bridge download status across SETCONF, HUP · 2b9c5ee3
      Nick Mathewson authored
      This code changes it so that we don't remove bridges immediately when
      we start re-parsing our configuration.  Instead, we mark them all, and
      remove all the marked ones after re-parsing our bridge lines.  As we
      add a bridge, we see if it's already in the list.  If so, we just
      unmark it.
      
      This new behavior will lose the property we used to have that bridges
      were in bridge_list in the same order in which they appeared in the
      torrc.  I took a quick look through the code, and I'm pretty sure we
      didn't actually depend on that anywhere.
      
      This is for bug 3019; it's a fix on 0.2.0.3-alpha.
      2b9c5ee3
  23. Jan 15, 2011
    • Sebastian Hahn's avatar
      Sanity-check consensus param values · 026e7987
      Sebastian Hahn authored
      We need to make sure that the worst thing that a weird consensus param
      can do to us is to break our Tor (and only if the other Tors are
      reliably broken in the same way) so that the majority of directory
      authorities can't pull any attacks that are worse than the DoS that
      they can trigger by simply shutting down.
      
      One of these worse things was the cbtnummodes parameter, which could
      lead to heap corruption on some systems if the value was sufficiently
      large.
      
      This commit fixes this particular issue and also introduces sanity
      checking for all consensus parameters.
      026e7987
  24. Jan 03, 2011
  25. Oct 01, 2010
    • Nick Mathewson's avatar
      Initial conversion to use node_t throughout our codebase. · 26e89742
      Nick Mathewson authored
      A node_t is an abstraction over routerstatus_t, routerinfo_t, and
      microdesc_t.  It should try to present a consistent interface to all
      of them.  There should be a node_t for a server whenever there is
        * A routerinfo_t for it in the routerlist
        * A routerstatus_t in the current_consensus.
      (note that a microdesc_t alone isn't enough to make a node_t exist,
      since microdescriptors aren't usable on their own.)
      
      There are three ways to get a node_t right now: looking it up by ID,
      looking it up by nickname, and iterating over the whole list of
      microdescriptors.
      
      All (or nearly all) functions that are supposed to return "a router"
      -- especially those used in building connections and circuits --
      should return a node_t, not a routerinfo_t or a routerstatus_t.
      
      A node_t should hold all the *mutable* flags about a node.  This
      patch moves the is_foo flags from routerinfo_t into node_t.  The
      flags in routerstatus_t remain, but they get set from the consensus
      and should not change.
      
      Some other highlights of this patch are:
      
        * Looking up routerinfo and routerstatus by nickname is now
          unified and based on the "look up a node by nickname" function.
          This tries to look only at the values from current consensus,
          and not get confused by the routerinfo_t->is_named flag, which
          could get set for other weird reasons.  This changes the
          behavior of how authorities (when acting as clients) deal with
          nodes that have been listed by nickname.
      
        * I tried not to artificially increase the size of the diff here
          by moving functions around.  As a result, some functions that
          now operate on nodes are now in the wrong file -- they should
          get moved to nodelist.c once this refactoring settles down.
          This moving should happen as part of a patch that moves
          functions AND NOTHING ELSE.
      
        * Some old code is now left around inside #if 0/1 blocks, and
          should get removed once I've verified that I don't want it
          sitting around to see how we used to do things.
      
      There are still some unimplemented functions: these are flagged
      with "UNIMPLEMENTED_NODELIST()."  I'll work on filling in the
      implementation here, piece by piece.
      
      I wish this patch could have been smaller, but there did not seem to
      be any piece of it that was independent from the rest.  Moving flags
      forces many functions that once returned routerinfo_t * to return
      node_t *, which forces their friends to change, and so on.
      26e89742
    • Nick Mathewson's avatar
      d84d20cb
  26. Sep 29, 2010
  27. Sep 28, 2010
  28. Aug 17, 2010
  29. Aug 15, 2010
  30. Jul 28, 2010
  31. Jul 27, 2010
Loading