- 14 Oct, 2010 2 commits
-
-
Sebastian Hahn authored
-
Nick Mathewson authored
Also remove some debugging code.
-
- 07 Oct, 2010 1 commit
-
-
Nick Mathewson authored
-
- 01 Oct, 2010 3 commits
-
-
Nick Mathewson authored
-
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.
-
Nick Mathewson authored
-
- 15 Aug, 2010 1 commit
-
-
Sebastian Hahn authored
-
- 27 Jul, 2010 4 commits
-
-
Sebastian Hahn authored
-
Sebastian Hahn authored
-
Sebastian Hahn authored
-
Sebastian Hahn authored
-
- 18 Jul, 2010 1 commit
-
-
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.
-
- 27 Feb, 2010 1 commit
-
-
Nick Mathewson authored
-
- 09 Feb, 2010 1 commit
-
-
Sebastian Hahn authored
It isn't necessary to walk through all possible subnets when the policy we're looking at doesn't touch that subnet.
-
- 08 Feb, 2010 1 commit
-
-
Sebastian Hahn authored
-
- 03 Feb, 2010 2 commits
-
-
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.
-
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.
-
- 15 Jan, 2010 1 commit
-
-
Roger Dingledine authored
-
- 12 Dec, 2009 1 commit
-
-
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.
-
- 27 Oct, 2009 1 commit
-
-
Karsten Loesing authored
Bridges do not use the default exit policy, but reject *:* by default.
-
- 05 Jun, 2009 1 commit
-
-
Nick Mathewson authored
This is a posible fix for bug 996.
-
- 27 May, 2009 1 commit
-
-
Nick Mathewson authored
-
- 04 May, 2009 1 commit
-
-
- 02 May, 2009 1 commit
-
-
Karsten Loesing authored
-
- 09 Mar, 2009 1 commit
-
-
Nick Mathewson authored
svn:r18827
-
- 04 Jan, 2009 1 commit
-
-
Nick Mathewson authored
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
-
- 29 Dec, 2008 2 commits
-
-
Nick Mathewson authored
Switch address comparisons in policies to be exact rather than semantic. Until we do ipv6 exit policies and until we know whether we even allow ::ffff:0:0/96 addresses, there is no point in doing "semantic" comparisons. This was also showing up on oprofile. svn:r17803
-
Nick Mathewson authored
Specifically, split compare_tor_addr_to_addr_policy() from a loop with a bunch of complicated ifs inside into some ifs, each with a simple loop. Rearrange router_find_exact_exit_enclave() to run a little faster. Bizarrely, router_policy_rejects_all() shows up on oprofile, so precalculate it per routerinfo. svn:r17802
-
- 22 Dec, 2008 2 commits
-
-
Nick Mathewson authored
svn:r17734
-
Nick Mathewson authored
Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen. svn:r17729
-
- 18 Dec, 2008 1 commit
-
-
Nick Mathewson authored
svn:r17686
-
- 07 Nov, 2008 1 commit
-
-
Nick Mathewson authored
svn:r17199
-
- 03 Nov, 2008 1 commit
-
-
Nick Mathewson authored
svn:r17186
-
- 13 Sep, 2008 1 commit
-
-
Roger Dingledine authored
rejected them in 0.1.0.15, because back in 2005 they were commonly misconfigured and ended up as spam targets. We hear they are better locked down these days. svn:r16898
-
- 09 Sep, 2008 1 commit
-
-
Nick Mathewson authored
svn:r16802
-
- 05 Sep, 2008 2 commits
-
-
Nick Mathewson authored
svn:r16780
-
Nick Mathewson authored
svn:r16779
-
- 14 Aug, 2008 3 commits
-
-
Peter Palfrader authored
svn:r16549
-
Peter Palfrader authored
Having a reject-all policy summarized with a lack of summary is stupid. Explicitly mention them as reject 1-65535. svn:r16543
-
Peter Palfrader authored
svn:r16535
-