1. 14 Oct, 2010 2 commits
  2. 07 Oct, 2010 1 commit
  3. 01 Oct, 2010 3 commits
    • Nick Mathewson's avatar
    • 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
  4. 15 Aug, 2010 1 commit
  5. 27 Jul, 2010 4 commits
  6. 18 Jul, 2010 1 commit
    • Nick Mathewson's avatar
      Make the controller act more usefully when GETINFO fails · 0b4b5131
      Nick Mathewson authored
      Right now it says "552 internal error" because there's no way for
      getinfo_helper_*() countries to specify an error message.  This
      patch changes the getinfo_helper_*() interface, and makes most of the
      getinfo helpers give useful error messages in response to failures.
      
      This should prevent recurrences of bug 1699, where a missing GeoIPFile
      line in the torrc made GETINFO ip-to-county/* fail in a "not obvious
      how to fix" way.
      0b4b5131
  7. 27 Feb, 2010 1 commit
  8. 09 Feb, 2010 1 commit
  9. 08 Feb, 2010 1 commit
  10. 03 Feb, 2010 2 commits
    • Nick Mathewson's avatar
      Trivial doc fix for exit_policy_is_general_exit_helper · ba0c9e5d
      Nick Mathewson authored
      The original comment said what it did if there was at least one /8 that
      allowed access to the port, but not what it did otherwise.
      ba0c9e5d
    • Sebastian Hahn's avatar
      Don't assign Exit flag incorrectly · 03bd98b3
      Sebastian Hahn authored
      exit_policy_is_general_exit() assumed that there are no redundancies
      in the passed policy, in the sense that we actively combine entries
      in the policy to really get rid of any redundancy. Since we cannot
      do that without massively rewriting the policy lines the relay
      operators set, fix exit_policy_is_general_exit().
      
      Fixes bug 1238, discovered by Martin Kowalczyk.
      03bd98b3
  11. 15 Jan, 2010 1 commit
  12. 12 Dec, 2009 1 commit
    • Sebastian Hahn's avatar
      *_free functions now accept NULL · 3807db00
      Sebastian Hahn authored
      Some *_free functions threw asserts when passed NULL. Now all of them
      accept NULL as input and perform no action when called that way.
      
      This gains us consistence for our free functions, and allows some
      code simplifications where an explicit null check is no longer necessary.
      3807db00
  13. 27 Oct, 2009 1 commit
    • Karsten Loesing's avatar
      Fix bug 1113. · 56c23851
      Karsten Loesing authored
      Bridges do not use the default exit policy, but reject *:* by default.
      56c23851
  14. 05 Jun, 2009 1 commit
  15. 27 May, 2009 1 commit
  16. 04 May, 2009 1 commit
  17. 02 May, 2009 1 commit
  18. 09 Mar, 2009 1 commit
  19. 04 Jan, 2009 1 commit
  20. 29 Dec, 2008 2 commits
  21. 22 Dec, 2008 2 commits
  22. 18 Dec, 2008 1 commit
  23. 07 Nov, 2008 1 commit
  24. 03 Nov, 2008 1 commit
  25. 13 Sep, 2008 1 commit
  26. 09 Sep, 2008 1 commit
  27. 05 Sep, 2008 2 commits
  28. 14 Aug, 2008 3 commits