Commit Graph

658 Commits

Author SHA1 Message Date
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
Nick Mathewson
558e9899e4 Document most undocumented variables.
svn:r17754
2008-12-23 17:56:31 +00:00
Nick Mathewson
b68379b13b Add DOCDOC entries for undocumented static and global variables.
svn:r17739
2008-12-22 19:00:05 +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
Roger Dingledine
0c6ff7d990 the default should not be the notify the poster, unless something
more extreme happens. the default should be to be quiet unless
something more extreme happens.

at least, this doesn't generate complaints anymore. perhaps that
means it is working better? :)


svn:r17724
2008-12-22 06:25:49 +00:00
Nick Mathewson
e36c7a74bd Yet still more propagating of things that need to be was_router_added_t now.
svn:r17722
2008-12-22 05:21:49 +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
df22dcb602 WRA_MORE_SEVERE is not WRA_GET_MORE_SEVERE.
svn:r17720
2008-12-22 04:36:52 +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
f3f6daf819 Avoid nop call to control_event_or_authdir_new_descriptor that makes coverity think we are dereferencing a null pointer. It is safe, I think, but entirely too clever for our own good.
svn:r17668
2008-12-18 04:45:47 +00:00
Roger Dingledine
03f413f5c7 declare that we're putting out 0.2.1.9-alpha next week
svn:r17659
2008-12-17 22:46:00 +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
f43bcdc063 Use ctags and a python script to find identifiers that are never used anywhere, and remove the ones that we really want gone.
svn:r17651
2008-12-17 17:20:42 +00:00
Roger Dingledine
d27337bf17 i needed a piece of the 'patching patches' action too
svn:r17202
2008-11-07 03:39:19 +00:00
Nick Mathewson
a38026bb06 fix wide lines
svn:r17198
2008-11-07 01:48:55 +00:00
Roger Dingledine
f2708dd40f a few more tweaks
svn:r17010
2008-09-30 09:32:26 +00:00
Nick Mathewson
57db1c1a7d Tweak the dbg-stability.txt code to log everything else that influences router stability calculations.
svn:r17003
2008-09-29 14:40:34 +00:00
Roger Dingledine
dbb481c169 Serve the latest v3 networkstatus consensus via the control
port. Use "getinfo dir/status-vote/current/consensus" to fetch it.


svn:r16907
2008-09-14 04:07:29 +00:00
Nick Mathewson
0b8117a5c0 Fix numerous memory leaks: some were almost impossible to trigger, and some almost inevitable.
svn:r16779
2008-09-05 20:52:15 +00:00
Peter Palfrader
d3be2cb7fb And tell us more in another error case
svn:r16577
2008-08-17 08:14:57 +00:00
Peter Palfrader
ab9078fca0 Change a warning/bug message
svn:r16576
2008-08-17 08:11:21 +00:00
Peter Palfrader
e8de3ff54d If we are lucky the whitespace nazis will not have noticed these things yet
svn:r16549
2008-08-14 18:01:20 +00:00
Peter Palfrader
7c4106135a Give bw in kb/sec in votes/consensus
svn:r16544
2008-08-14 12:37:59 +00:00
Peter Palfrader
ff32708d0e Having a reject-all policy summarized with a lack of summary is stupid. Explicitly mention them as reject 1-65535.
svn:r16543
2008-08-14 12:37:50 +00:00
Peter Palfrader
6317cc2956 Only fetch the routerinfo_t in routerstatus_format_entry() if we are going to need it
svn:r16541
2008-08-14 12:37:34 +00:00
Peter Palfrader
a6ade97f67 Properly move forward char pointer after appending stuff to the string
svn:r16540
2008-08-14 12:37:28 +00:00
Peter Palfrader
1a2c6b41e3 Do not show policy and bw in v2 statuses
svn:r16537
2008-08-14 12:37:07 +00:00
Peter Palfrader
24da63ea7b Add exit policy and bw to dirvotes - unfortunately also to v2 statuses
svn:r16536
2008-08-14 12:37:00 +00:00
Nick Mathewson
960a0f0a99 r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types.  Most of the Tor wire formats using these new types are in, but the code to generate and use it is not.  This is a big patch.  Let me know what it breaks for you.


svn:r16435
2008-08-05 20:08:19 +00:00
Roger Dingledine
d5bb361977 minor fixes
svn:r16407
2008-08-04 23:59:38 +00:00
Nick Mathewson
3ce6e2fba2 r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200
Make generic address manipulation functions work better.  Switch address policy code to use tor_addr_t, so it can handle IPv6.  That is a good place to start.


svn:r16178
2008-07-24 13:44:04 +00:00
Nick Mathewson
dff1ef7d06 r17337@aud-055: nickm | 2008-07-24 10:17:43 +0200
Refactor the is_vote field of networkstatus_t to add a third possibility ("opinion") in addition to vote and opinion.  First part of implementing proposal 147.


svn:r16166
2008-07-24 09:22:27 +00:00
Nick Mathewson
bdcbd23e23 Stop trying to detect versions of Tor on the server-side older than 0.1.1.15-rc; they simply do not work any more. Also add comment about how or_is_obsolete is a terrible field name.
svn:r15982
2008-07-16 13:15:11 +00:00
Karsten Loesing
33ced73597 Added prefixes to testing-network-only configuration options.
svn:r15375
2008-06-20 17:03:13 +00:00
Nick Mathewson
44452c2756 r16341@tombo: nickm | 2008-06-15 22:04:25 -0400
Allow spaces to be omitted in approved-router file fingerprints. Requested by arma.


svn:r15296
2008-06-16 02:08:30 +00:00
Nick Mathewson
0831cc3dbc Patch from Karsten to implement proposal 135 ("Testing Tor Networks").
svn:r15253
2008-06-14 16:01:29 +00:00
Nick Mathewson
f3f6ecef48 r19690@catbus: nickm | 2008-05-11 22:13:31 -0400
Implement a proposal to let a directory authority migrate its identity key without ceasing to sign consensuses.


svn:r14584
2008-05-12 02:14:01 +00:00
Nick Mathewson
85db675911 r19202@catbus: nickm | 2008-04-04 17:18:47 -0400
Make last_served_at optional; make last_listed_as_valid_until take account (partially) of v2 statuses.


svn:r14299
2008-04-04 21:18:56 +00:00
Nick Mathewson
e19d96637d r19118@catbus: nickm | 2008-03-29 00:27:08 -0400
Code (disabled) to get way too much info about the contents of old_routers on USR1.


svn:r14230
2008-03-29 04:27:34 +00:00
Nick Mathewson
3452486ac6 r14422@tombo: nickm | 2008-02-24 17:09:56 -0500
Whitespace fixes


svn:r13700
2008-02-24 22:11:18 +00:00
Nick Mathewson
ee8dce3084 r14421@tombo: nickm | 2008-02-24 17:05:18 -0500
Patch from mwenge: always willingly serve our own extrainfo from the controlport


svn:r13699
2008-02-24 22:11:12 +00:00
Roger Dingledine
31f72a3d80 Servers that don't know their own IP address should go to the
authorities for their first directory fetch, even if their DirPort
is off or if they don't know they're reachable yet. This will help
them bootstrap better. Bugfix on 0.2.0.18-alpha; fixes bug 609.


svn:r13688
2008-02-23 23:39:16 +00:00
Nick Mathewson
e7db789e82 r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
More 64-to-32 fixes. Partial backport candidate. still not done.


svn:r13680
2008-02-22 19:09:45 +00:00
Nick Mathewson
1df0647c66 r18291@catbus: nickm | 2008-02-20 22:35:32 -0500
Resolve all DOCDOC issues, and document some other undocumented code, and fix a changelog entry.


svn:r13638
2008-02-21 03:38:46 +00:00
Nick Mathewson
ca4eb987c8 r14182@tombo: nickm | 2008-02-15 17:20:51 -0500
Defer, downgrade, or address more XXX020s.  The remaining ones are all ones we should deal with before release.


svn:r13530
2008-02-15 23:39:08 +00:00
Nick Mathewson
842a33ff20 Update some copyright notices: it is now 2008.
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
a869574c56 r17947@catbus: nickm | 2008-02-06 11:57:53 -0500
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items.


svn:r13405
2008-02-06 16:58:05 +00:00
Roger Dingledine
f76cdc1a61 misc small fixes
svn:r13403
2008-02-06 12:46:46 +00:00
Nick Mathewson
83e740fa91 r17911@catbus: nickm | 2008-02-05 15:53:22 -0500
Fix a potential bug that would make authorities fail to vote under bizarre circumstances that probably never happened.


svn:r13385
2008-02-05 21:39:36 +00:00
Nick Mathewson
c8a689c9e8 r17909@catbus: nickm | 2008-02-05 14:48:22 -0500
As planned, rename networkstatus_vote_t to networkstatus_t, now that v3 networkstatuses are working and standard and v2 networkstatuses are obsolete.


svn:r13383
2008-02-05 21:39:29 +00:00
Nick Mathewson
3958d7b16f r17898@catbus: nickm | 2008-02-05 14:01:35 -0500
Add (and use) a MAP_DEL_CURRENT macro to augment a non-const variant of MAP_FOREACH.


svn:r13379
2008-02-05 19:40:17 +00:00
Roger Dingledine
06047bcec9 Avoid going directly to the directory authorities even if you're a
relay, if you haven't found yourself reachable yet or if you've
decided not to advertise your dirport yet. Addresses bug 556.


svn:r13172
2008-01-18 04:42:22 +00:00
Nick Mathewson
04263648c4 r17554@catbus: nickm | 2008-01-10 12:48:29 -0500
Do not send bridge descriptors over unencrypted connections.


svn:r13094
2008-01-10 17:48:40 +00:00
Nick Mathewson
ca5f670fab r17548@catbus: nickm | 2008-01-10 11:08:12 -0500
Make proposal-109 behavior optional.


svn:r13090
2008-01-10 16:08:47 +00:00
Nick Mathewson
614dc52623 r17467@catbus: nickm | 2008-01-05 19:54:20 -0500
fix whitespace


svn:r13035
2008-01-06 00:54:22 +00:00
Roger Dingledine
15c048bdc5 Fix several remotely triggerable asserts based on DirPort requests
for a v2 or v3 networkstatus object before we were prepared. This
was particularly bad for 0.2.0.13 and later bridge relays, who
would never have a v2 networkstatus and would thus always crash
when used. Bugfixes on 0.2.0.x.

Estimate the v3 networkstatus size more accurately, rather than
estimating it at zero bytes and giving it artificially high priority 
compared to other directory requests. Bugfix on 0.2.0.x.


svn:r12952
2007-12-24 11:25:45 +00:00
Roger Dingledine
9ebf86bb66 new config option FetchDirInfoEarly for tup/ioerror and the tordnsel
svn:r12896
2007-12-21 06:08:00 +00:00
Roger Dingledine
f0e7c4f0da Only Tors that want to mirror the v2 directory info should
create the "cached-status" directory in their datadir. All Tors
used to create it. Bugfix on 0.1.2.x.

Bridge relays with DirPort set to 0 no longer cache v1 or v2
directory information; there's no point. Bugfix on trunk.


svn:r12887
2007-12-20 06:47:59 +00:00
Roger Dingledine
74d05f4b2c answer getinfo ns/purpose/bridge queries
svn:r12860
2007-12-18 22:39:15 +00:00
Roger Dingledine
b63a247c68 Make bridge authorities test reachability of bridges.
Added two XXX020's that we need to think harder about.


svn:r12859
2007-12-18 21:37:58 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
ee6ae92670 New config options AuthDirBadDir and AuthDirListBadDirs for
authorities to mark certain relays as "bad directories" in the
networkstatus documents. Also supports the "!baddir" directive in
the approved-routers file.


svn:r12754
2007-12-10 16:49:54 +00:00
Roger Dingledine
d95e7c7d67 also clear the hsdir status flag in routerinfo_t when the relay is no
longer listed in the relevant networkstatus document.


svn:r12752
2007-12-10 16:40:14 +00:00
Roger Dingledine
75c38a2c88 Bridges now behave like clients with respect to time intervals for
downloading new consensus documents. Bridge users now wait until
the end of the interval, so their bridge will be sure to have a
new consensus document.


svn:r12696
2007-12-06 17:01:16 +00:00
Roger Dingledine
d46b8a3eac Stop being so aggressive about fetching dir info if your DirPort is
on but your ORPort is off.

Add a new config option BridgeRelay that specifies you want to
be a bridge relay. Right now the only difference is that it makes
you answer begin_dir requests, and it makes you cache dir info,
even if your DirPort isn't on.

Refactor directory_caches_dir_info() into some more functions.


svn:r12668
2007-12-04 18:35:03 +00:00
Roger Dingledine
3229117d3a minor touchups
svn:r12657
2007-12-03 22:04:19 +00:00
Roger Dingledine
b54240d38f Reject uploaded descriptors and extrainfo documents if they're
huge. Otherwise we'll cache them all over the network and it'll
clog everything up.


svn:r12633
2007-12-02 06:11:53 +00:00
Roger Dingledine
1a254477fc minor cleanups
svn:r12631
2007-12-02 04:39:56 +00:00
Roger Dingledine
f901cd064c clean up the dirserv_add_multiple_descriptors() api
svn:r12630
2007-12-02 02:47:42 +00:00
Roger Dingledine
f8df8d791e start to refactor dirserver_mode()
svn:r12621
2007-12-01 04:58:53 +00:00
Roger Dingledine
aaf35cccf7 karsten's second refactoring patch
svn:r12607
2007-11-29 15:25:04 +00:00
Roger Dingledine
094096d320 get rid of the __ConsiderAllRoutersAsHidServDirectories config option
svn:r12528
2007-11-17 12:28:18 +00:00
Roger Dingledine
d62ef13d0a get rid of the separate reachability window for the hsdir flag.
svn:r12527
2007-11-17 12:15:32 +00:00
Roger Dingledine
c336dedd21 The fix in 0.2.0.12-alpha cleared the "hsdir" flag in v3 network
consensus documents when there are too many relays at a single
IP address. Now clear it in v2 network status documents too.


svn:r12522
2007-11-17 07:00:14 +00:00
Roger Dingledine
d6f8ba25c9 back out r12509 and fix a better bug instead:
When authorities detected more than two relays running on the same
IP address, they were clearing all the status flags but forgetting
to clear the "hsdir" flag. So clients were being told that a
given relay was the right choice for a v2 hsdir lookup, yet they
never had its descriptor because it was marked as 'not running'
in the consensus.


svn:r12515
2007-11-17 01:53:33 +00:00
Nick Mathewson
1bdbd3b98e r16582@catbus: nickm | 2007-11-08 13:14:16 -0500
Try to bulletproof the parse logic for router-stability.


svn:r12441
2007-11-08 18:15:49 +00:00
Nick Mathewson
e0b9c893bc r16573@catbus: nickm | 2007-11-08 11:57:16 -0500
Mess with the formula for the Guard flag again.  Now it requires that you be in the most familiar 7/8 of nodes, and have above median wfu for that 7/8th.  See spec for details.  Also, log thresholds better.


svn:r12440
2007-11-08 16:58:59 +00:00
Nick Mathewson
e136f00ca8 r16262@catbus: nickm | 2007-10-29 13:21:35 -0400
Patch from Karsten: Code to act as (and use) v2 hidden service directories.


svn:r12272
2007-10-29 19:10:42 +00:00
Peter Palfrader
471163ffd5 Downgrade the mismatched fpr warning to info
svn:r12257
2007-10-28 20:01:22 +00:00
Nick Mathewson
66a39ac358 r16238@catbus: nickm | 2007-10-28 15:46:10 -0400
Whitespace fix.


svn:r12256
2007-10-28 19:48:19 +00:00
Nick Mathewson
8fa7071121 r16195@catbus: nickm | 2007-10-26 18:48:52 -0400
base "Guard" flag on WFU rather than MTBF.  Note an issue in the TODO. Roger: thoughts?


svn:r12219
2007-10-26 22:50:42 +00:00
Nick Mathewson
73c1cfe80b r16154@catbus: nickm | 2007-10-25 10:29:47 -0400
Fix more memory leaks, with help from dmalloc.


svn:r12188
2007-10-25 14:31:15 +00:00
Roger Dingledine
7a35dad007 Authorities no longer send back "400 you're unreachable please fix
it" errors to Tor servers that aren't online all the time. We're
supposed to tolerate these servers now.


svn:r12136
2007-10-24 03:34:03 +00:00
Roger Dingledine
cb2b49c9c4 When there's no concensus, we were forming a vote every 30
minutes, but writing the "valid-after" line in our vote based
on our configured V3AuthVotingInterval: so unless the intervals
matched up, we immediately rejected our own vote because it didn't
start at the voting interval that caused us to construct a vote.

This caused log entries like:

Oct 23 01:16:16.303 [notice] Choosing expected valid-after time
as 2007-10-23 05:30:00: consensus_set=0, interval=1800
...
Oct 23 01:20:01.203 [notice] Choosing valid-after time in vote as
2007-10-23 06:00:00: consensus_set=0, interval=3600
Oct 23 01:20:01.290 [warn] Rejecting vote with valid-after time of
2007-10-23 06:00:00; we were expecting 2007-10-23 05:30:00
Oct 23 01:20:01.291 [warn] Couldn't store my own vote! (I told
myself, 'Bad valid-after time'.)

Nick, you should look at this, as it's your design. :)


svn:r12129
2007-10-23 06:38:16 +00:00
Nick Mathewson
09bce19884 r16042@catbus: nickm | 2007-10-22 13:30:49 -0400
Move functions into and out of dirvote.c so that it contains all the v3 authority functionality, and no non-authority functionality.


svn:r12107
2007-10-22 17:31:26 +00:00
Nick Mathewson
5ada3cc09a r15991@catbus: nickm | 2007-10-20 20:08:29 -0400
Fix a nasty bug in DownloadExtraInfo implementation where we would discard, download, discard, download ad infinitum.


svn:r12069
2007-10-21 00:08:35 +00:00
Nick Mathewson
6ca4eebb57 r15966@catbus: nickm | 2007-10-19 13:56:28 -0400
Voting side of proposal 122


svn:r12052
2007-10-19 18:56:26 +00:00
Nick Mathewson
140ef7d0f8 r15957@catbus: nickm | 2007-10-19 12:22:18 -0400
Report our IP address in our vote if it turns out that our hostname isn't a fqdn.


svn:r12047
2007-10-19 16:28:13 +00:00
Nick Mathewson
f988f93b1a r15877@catbus: nickm | 2007-10-17 12:54:56 -0400
Make unverified-consensus get removed when it is accepted or rejected.  Make a new get_datadir_fname*() set of functions to eliminate the common code of "get the options, get the datadir, append some stuff".


svn:r12000
2007-10-17 16:55:44 +00:00
Nick Mathewson
3ad6dc0e2e r15806@catbus: nickm | 2007-10-15 19:14:57 -0400
Implement v3 networkstatus client code.  Remove v2 networkstatus client code, except as needed for caches to fetch and serve v2 networkstatues and the routers they list.


svn:r11957
2007-10-15 23:15:24 +00:00
Nick Mathewson
738d178f77 Make last commit compile
svn:r11953
2007-10-15 20:39:58 +00:00
Nick Mathewson
da955df111 Add some debugging logs related to dir vote timing.
svn:r11952
2007-10-15 20:37:59 +00:00
Nick Mathewson
783402f63a r15731@catbus: nickm | 2007-10-12 17:27:48 -0400
Move "sort a list of routerinfo_t" into its own function in routerlist.c


svn:r11903
2007-10-12 21:33:37 +00:00
Nick Mathewson
007d76543d r14887@Kushana: nickm | 2007-10-11 11:19:39 -0400
Fix some XXX020s in dirserv.c


svn:r11870
2007-10-11 16:06:51 +00:00
Nick Mathewson
9a56b17c54 r15679@catbus: nickm | 2007-10-11 09:51:33 -0400
Remove code to generate v1 directories.


svn:r11866
2007-10-11 13:56:33 +00:00
Nick Mathewson
487f985f5b r15670@catbus: nickm | 2007-10-10 20:08:14 -0400
Restore a removed assert.


svn:r11861
2007-10-11 00:13:06 +00:00
Roger Dingledine
dd920354c2 let bridge authorities write bridge descriptors to their
cached-descriptors* files.

nick, did i get this right?


svn:r11855
2007-10-10 23:11:53 +00:00