Commit Graph

1000 Commits

Author SHA1 Message Date
Roger Dingledine
580066f2f6 Switch to a StrictNodes config option.
This is step one of handling ExcludedNodes better. This first
step is just to make EntryNodes and ExitNodes do what they did
before.
2009-12-21 03:52:31 -05:00
Karsten Loesing
f80672d747 Remove duplicate words and a duplicate newline. 2009-12-18 12:55:05 +01:00
Nick Mathewson
0c1b3070cf Now that FOO_free(NULL) always works, remove checks before calling it. 2009-12-12 02:07:59 -05:00
Sebastian Hahn
3807db001d *_free functions now accept NULL
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.
2009-12-12 03:29:44 +01:00
Nick Mathewson
f629687053 Merge branch 'microdesc' 2009-10-19 00:45:47 -04:00
Nick Mathewson
465d4e1cd1 Document some formerly undocumented functions. 2009-10-19 00:30:52 -04:00
Nick Mathewson
bb22d8fc45 Add functions to serve microdescs and flavored consensuses. 2009-10-18 18:46:12 -04:00
Nick Mathewson
3b2fc659a8 Refactor consensus signature storage for multiple digests and flavors.
This patch introduces a new type called document_signature_t to represent the
signature of a consensus document.  Now, each consensus document can have up
to one document signature per voter per digest algorithm.  Also, each
detached-signatures document can have up to one signature per <voter,
algorithm, flavor>.
2009-10-15 15:17:13 -04:00
Roger Dingledine
7f518873eb Notice v3 cert parsing failures
If any the v3 certs we download are unparseable, we should actually
notice the failure so we don't retry indefinitely. Bugfix on 0.2.0.x;
reported by "rotator".
2009-08-20 16:50:51 -04:00
Roger Dingledine
bdca5476da the second piece of bug 969 fixing
whenever we remove a relay from the main routerlist, tell the
rephist module that it's no longer running.
2009-06-30 10:10:13 -04:00
Roger Dingledine
9fc3d87827 stop capping bandwidths we see in the consensus
but continue capping bandwidths we see in local server
descriptors, if we have no consensus weights for them.
2009-06-25 11:38:05 -04:00
Roger Dingledine
1aaab8288d Clients now use bandwidth values in the consensus
rather than the bandwidth values in each relay descriptor. This approach
opens the door to more accurate bandwidth estimates once the directory
authorities start doing active measurements. Implements more of proposal
141.
2009-06-22 14:01:34 -04:00
Nick Mathewson
e8ac2a8477 Make the second argument to routerset_contains_extendinfo const 2009-05-31 19:15:36 -04:00
Nick Mathewson
ec7e054668 Spell-check Tor. 2009-05-27 17:55:51 -04:00
Nick Mathewson
c0515b307c Fix valgrind error when marking a descriptor as never-downloadable.
When we got a descriptor that we (as an authority) rejected as totally
bad, we were freeing it, then using the digest in its RAM to look up its
download status.  Caught by arma with valgrind.  Bugfix on 0.2.1.9-alpha.
2009-05-17 02:01:09 -04:00
Karsten Loesing
9b32e8c141 Update copyright to 2009. 2009-05-04 11:28:27 -04:00
Karsten Loesing
4e6120cffb Documentation fix.
svn:r19337
2009-04-16 08:25:36 +00:00
Sebastian Hahn
8390787a5f Directory authorities should accept a descriptor as changed when the relay operator changed the bandwithrate or bandwithburst settings.
svn:r19259
2009-04-11 00:12:52 +00:00
Nick Mathewson
ad7ebec24c Free very-old descriptors that we do not want to add. Fix for bug 672. Backport candidate
svn:r19057
2009-03-16 18:47:45 +00:00
Roger Dingledine
4774e593b8 Bugfix on r17756:
Avoid trying to print raw memory to the logs when we decide to
give up on downloading a given relay descriptor. Bugfix on
0.2.1.9-alpha.


svn:r18831
2009-03-09 22:05:17 +00:00
Nick Mathewson
b13496b62a Possible fix for broken country settings in ExcludeExitNodes.
It turns out that we weren't updating the _ExcludeExitNodesUnion set's
country numbers when we reloaded (or first loaded!) the IP-to-country
file.  Spotted by Lark.  Bugfix on 0.2.1.6-alpha.

svn:r18575
2009-02-16 15:15:06 +00:00
Nick Mathewson
356b40f58b Clients and non-caches do not need to cache unrecognized authority certificates.
svn:r18480
2009-02-10 20:28:30 +00:00
Nick Mathewson
6bf5d49b8a Now that we can hit the end of router_rebuild_store before chunk_list is set, we need to test it before freeing it.
svn:r18101
2009-01-14 06:36:30 +00:00
Nick Mathewson
a33452c401 Fix up (I hope) most ot the things that coverity suddenly claimed were REVERSE_INULL. This is what we get for bragging about being down to 0 issues.
svn:r18096
2009-01-13 14:43:51 +00:00
Roger Dingledine
c123163043 Discard router descriptors as we load them if they are more than
five days old. Otherwise if Tor is off for a long time and then
starts with cached descriptors, it will try to use the onion
keys in those obsolete descriptors when building circuits. Bugfix
on 0.2.0.x. Fixes bug 887.


svn:r17993
2009-01-07 02:13:42 +00:00
Nick Mathewson
92ce533f71 Another round of downgrading removing or postponing XXXX021 issues. Some remain, though.
svn:r17888
2009-01-04 19:47:21 +00:00
Nick Mathewson
360a059948 Fix an xxx021: do not remove routerinfos as too old and unlisted unless we have a consensus. Backport candidate.
svn:r17886
2009-01-04 19:47:12 +00:00
Nick Mathewson
c4b8fef362 Remove svn $Id$s from our source, and remove tor --version --version.
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
2009-01-04 00:35:51 +00:00
Nick Mathewson
9201586ed5 Another attempt at fixing coverity scan CID 361.
svn:r17863
2009-01-03 23:06:12 +00:00
Nick Mathewson
272b007268 coverity thinks it's dumb to check networkstatus_v2_list in one place and not another. Coverity has a point, even though the check may be redundant. CID 361.
svn:r17809
2008-12-29 14:06:47 +00:00
Nick Mathewson
870fd18b8f Refactor some exit-policy-related functions that showed up in oprofile.
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
2008-12-29 01:47:28 +00:00
Nick Mathewson
f7adc017c4 Document and make more conservative the logic for picking the size of the bloom filter to use for retaining descriptors.
svn:r17786
2008-12-26 17:35:36 +00:00
Nick Mathewson
df5e8f65bc Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
svn:r17783
2008-12-26 17:35:08 +00:00
Roger Dingledine
a12c3f2c86 some fixes i found in my sandbox
svn:r17771
2008-12-25 15:37:47 +00:00
Nick Mathewson
ac2f6b608a Patch from Sebiastian for bug 888: mark a descriptor as "Impossible" if we reject it after downloading it so that we do not download it again
svn:r17756
2008-12-23 21:17:52 +00:00
Nick Mathewson
1e5f457461 Fix most DOCDOCs remaining and/or added by redox.
svn:r17734
2008-12-22 17:53:04 +00:00
Nick Mathewson
167d266dbf Documentation and conformance for WRA_* returns.
shahn: "Add some documentation for the WRA_* family of functions, also make
sure that (hopefully) all functions that return was_router_added_t
don't return ints directly and that they don't refer to integers in
their documentation anymore."

svn:r17731
2008-12-22 16:37:20 +00:00
Nick Mathewson
1725c0c8a5 Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen.
svn:r17729
2008-12-22 14:56:28 +00:00
Nick Mathewson
55348884b5 Fix all of the doxygen warnings not pertaining to missing documentation.
svn:r17727
2008-12-22 14:56:16 +00:00
Nick Mathewson
98a376fab1 More propagating of things that need to be was_router_added_t now.
svn:r17721
2008-12-22 04:53:11 +00:00
Nick Mathewson
16f1d4cb72 Doc RRS_DONT_REMOVE_OLD; improve router_rebuild_store documentation.
svn:r17704
2008-12-19 18:51:44 +00:00
Nick Mathewson
122170c1d3 Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this patch.
svn:r17686
2008-12-18 16:11:24 +00:00
Nick Mathewson
c449e6e5be whitespace fixes.
svn:r17683
2008-12-18 16:11:08 +00:00
Nick Mathewson
6693f32530 Resolve many DOCDOCs.
svn:r17662
2008-12-17 22:58:20 +00:00
Nick Mathewson
33e2053ebc Make return code from router_add_to_routerlist a nice sensible enum. Based on patch from Sebastian.
svn:r17656
2008-12-17 21:50:01 +00:00
Nick Mathewson
f3b52e331e Avoid multiple descriptor-fetch connections to authorities. Fixes bug 366.
svn:r17594
2008-12-11 19:12:55 +00:00
Nick Mathewson
043b4fc59e Add a PDS_ flag to exclude authorities from which we are fetching descs.
Yes, this is maybe a little overspecific.  Part of a bug 366 fix.

svn:r17593
2008-12-11 19:12:48 +00:00
Nick Mathewson
29f5a65a16 Change directory_get_from_dirserver to take a set of flags to be passed to pick_(trusted_)dirserver. This lets us make its interface smarter, and makes code that calls it a little more readable.
svn:r17592
2008-12-11 19:12:45 +00:00
Nick Mathewson
7aa7d1a3e7 Give a better error when something has changed our descriptor cache out from under us. Based on patch from Karsten. Addresses bug 885.
svn:r17550
2008-12-10 03:01:26 +00:00
Roger Dingledine
e5be0504ab When the client is choosing entry guards, now it selects at most
one guard from a given relay family. Otherwise we could end up with
all of our entry points into the network run by the same operator. 
Suggested by Camilo Viecco. Fix on 0.1.1.11-alpha.

Not a backport candidate, since I think this might break for users
who only have a given /16 in their reachableaddresses, or something
like that.


svn:r17514
2008-12-08 00:04:29 +00:00