Commit Graph

556 Commits

Author SHA1 Message Date
Roger Dingledine
e5885deab5 Separate "SOCKS_COMMAND_CONNECT_DIR" into two flags in
edge_connection_t: want_onehop if it must attach to a circuit with
only one hop (e.g. for the current tunnelled connections that use
begin_dir), and use_begindir if we mean to use a BEGIN_DIR relay
command to establish the stream rather than the normal BEGIN. Now
we can make anonymized begin_dir connections for (e.g.) more secure
hidden service posting and fetching.


svn:r12244
2007-10-28 08:16:19 +00:00
Nick Mathewson
e0204f2119 r16112@catbus: nickm | 2007-10-24 15:52:03 -0400
Fix logic for downloading consensuses: make getting an duplicate or not-currently-valid consensus count as a failure.  Make running out of time to get certificates count as a failure.  Delay while fetching certificates.


svn:r12159
2007-10-24 19:53:11 +00:00
Nick Mathewson
9767415dca r16111@catbus: nickm | 2007-10-24 15:03:57 -0400
Allow multiple download schedules to exist.  At the moment, we use one for consensus, and the other one for everything else.


svn:r12158
2007-10-24 19:53:08 +00:00
Nick Mathewson
02e7a83f91 r16108@catbus: nickm | 2007-10-24 14:41:12 -0400
Refactor the arguments for router_pick_{directory_|trusteddir}server[_impl] so that they all take the same flags, and so that their flags have names.  Fix their documentation too.


svn:r12157
2007-10-24 18:42:16 +00:00
Nick Mathewson
4bab46d5d7 r16041@catbus: nickm | 2007-10-22 13:02:14 -0400
Reattempt certificate downloads immediately on failure, as appropriate.


svn:r12106
2007-10-22 17:31:22 +00:00
Nick Mathewson
25a68907a1 r16035@catbus: nickm | 2007-10-22 12:31:22 -0400
fix compile


svn:r12105
2007-10-22 16:32:10 +00:00
Nick Mathewson
7b80011990 r16033@catbus: nickm | 2007-10-22 12:26:13 -0400
Download some XXXX020s in dirvote.c and mark some functions that may not belong there.


svn:r12103
2007-10-22 16:32:06 +00:00
Nick Mathewson
5ff0e4ed56 r15917@catbus: nickm | 2007-10-18 10:50:01 -0400
Better log messages about extrainfo downloads.


svn:r12023
2007-10-18 14:50:59 +00:00
Nick Mathewson
59b1b08753 r15905@catbus: nickm | 2007-10-18 09:58:54 -0400
Document some functions while I can still rememberf what they do.  Fix up some whitespace.


svn:r12018
2007-10-18 14:19:51 +00:00
Nick Mathewson
4088a90d55 r15876@catbus: nickm | 2007-10-17 12:39:05 -0400
Treat certificates as reason to note directory info as arrived


svn:r11999
2007-10-17 16:55:41 +00:00
Nick Mathewson
0d26b623ee r15853@catbus: nickm | 2007-10-16 11:32:55 -0400
Fix "Error adding vote: OK" message.


svn:r11986
2007-10-16 15:34:14 +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
c8ad4f58ee r15780@catbus: nickm | 2007-10-15 10:35:16 -0400
Fix the implementation of "download votes by digest".


svn:r11943
2007-10-15 14:59:44 +00:00
Roger Dingledine
d9ba4d3e8b note a bug in directories_have_accepted_server_descriptor() pointed
out by weasel


svn:r11914
2007-10-13 22:01:24 +00:00
Roger Dingledine
e269feea77 stop handling 403 responses from directory authorities/mirrors. we
haven't issued those in years.


svn:r11913
2007-10-13 21:57:02 +00:00
Roger Dingledine
b60e138586 fix two instances of double-frees. may fix bug 527.
svn:r11893
2007-10-12 09:09:46 +00:00
Roger Dingledine
3d9bf8c912 note a design flaw that i should fix somehow
svn:r11889
2007-10-11 22:16:05 +00:00
Nick Mathewson
ff2820c1ba r14892@Kushana: nickm | 2007-10-11 14:00:33 -0400
Fix a bunch of XXX020s: treat some 403s as INFO severity; remove some dead code; share the retry path for consensus routerdescs that are also listed in the v2 networkstatus; check even more aspects of votes when parsing them.


svn:r11871
2007-10-11 18:01:12 +00:00
Nick Mathewson
a718fcb1c0 r15663@catbus: nickm | 2007-10-10 16:35:58 -0400
Resolve some more voting-related XXXXs.


svn:r11860
2007-10-11 00:13:03 +00:00
Nick Mathewson
17f3d2807d r15660@catbus: nickm | 2007-10-10 16:25:09 -0400
Fix compilation on last patch.


svn:r11853
2007-10-10 20:29:52 +00:00
Nick Mathewson
dace37aee8 r15656@catbus: nickm | 2007-10-10 16:23:18 -0400
Fix the implementation of if-modified-since for certificates so that it applies to all types of certificate requests.  Note that the kind of consensus that matters already has a working if-modified-since.


svn:r11852
2007-10-10 20:28:01 +00:00
Nick Mathewson
976c8f8a71 r15646@catbus: nickm | 2007-10-10 16:01:54 -0400
Fix some memory leaks when serving v3 networkstatus documents and v3 certs. Generate 503 correctly when serving v3 networkstatus documents and v3 certs.


svn:r11850
2007-10-10 20:06:38 +00:00
Nick Mathewson
55520a2d95 r15636@catbus: nickm | 2007-10-10 15:28:12 -0400
Retry consensus and certificate downloads properly.  Do not fail when there are no certificates to download.  Do not download certificates we already have when retrying.


svn:r11841
2007-10-10 19:33:19 +00:00
Nick Mathewson
b599d4264f r15633@catbus: nickm | 2007-10-10 14:16:54 -0400
Fix a spelling mistake.


svn:r11838
2007-10-10 19:33:06 +00:00
Nick Mathewson
72f352880c r15608@catbus: nickm | 2007-10-09 19:01:50 -0400
Give better messages and return values from signature uploads and downlaods; also, log actual errors when we screw up.


svn:r11823
2007-10-09 23:02:02 +00:00
Roger Dingledine
4f23045e58 back out a little bit of r11817 to preserve current behavior.
some other behavior changes left in.


svn:r11821
2007-10-09 21:12:48 +00:00
Nick Mathewson
8b71a76dd3 r15598@catbus: nickm | 2007-10-09 16:37:35 -0400
Turn all "Is DirPort nonzero? Because if it is, we must be a directory" logic into calls to dirserver_mode().


svn:r11817
2007-10-09 20:44:47 +00:00
Nick Mathewson
a2005cd2c1 r15590@catbus: nickm | 2007-10-09 15:14:42 -0400
Change dirvote_get_vote to take named flags rather than 3 boolean inputs.  Fix a bug that was caused by the order of the boolean inputs in or.h not matching the order of boolean inputs in dirvote.c.


svn:r11812
2007-10-09 19:14:48 +00:00
Nick Mathewson
5346a01796 r14813@Kushana: nickm | 2007-10-09 11:10:48 -0400
Use download_status_t for v2 networkstatuses and certs as well as for routers.  Make functions to manipulate it.  Next steps: use it for consensus networkstatuses, and get consensus download rescheduling working.


svn:r11800
2007-10-09 15:27:45 +00:00
Nick Mathewson
bb9cc4fb29 r14812@Kushana: nickm | 2007-10-09 10:22:00 -0400
Merge extra fields in local_routerstatus_t back into routerstatus_t.  See changelog for rationale.


svn:r11799
2007-10-09 15:27:15 +00:00
Nick Mathewson
3f6e3ce61b r14769@Kushana: nickm | 2007-10-07 14:00:17 -0400
Fetch networkstatus consensus documents as needed.  Disabled for clients until more caches support it.


svn:r11788
2007-10-08 17:44:09 +00:00
Nick Mathewson
6f7847b378 r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.


svn:r11761
2007-10-04 16:21:58 +00:00
Nick Mathewson
f4f780b526 r15510@catbus: nickm | 2007-10-02 16:14:42 -0400
Add support for more vote URLs that weasel wanted.  Weasel: please test this before I inflict it on anybody else. :)


svn:r11749
2007-10-02 20:19:43 +00:00
Nick Mathewson
b5c8a8ae53 r15422@catbus: nickm | 2007-09-27 16:42:35 -0400
Use descriptor annotations to record the source, download t time, and purpose of every descriptor we add to the store.  The remaining to-do item is to stop setting do_not_cache on bridges.


svn:r11680
2007-09-27 20:46:30 +00:00
Nick Mathewson
2050b31bb9 r15421@catbus: nickm | 2007-09-27 15:44:17 -0400
When we are a bridge directory, add bridges with purpose BRIDGE, not with purpose CONTROLLER.  Roger, is this right?


svn:r11679
2007-09-27 20:46:28 +00:00
Nick Mathewson
921f9f774d r15279@catbus: nickm | 2007-09-22 02:00:06 -0400
V3 authority work: fetch missing votes and/or signatures as needed.


svn:r11575
2007-09-22 06:06:05 +00:00
Roger Dingledine
b40230f45b note another bug i'd like to fix
svn:r11571
2007-09-22 00:05:46 +00:00
Roger Dingledine
523ac934de make directories_have_accepted_server_descriptor() able to
handle non-default values of PublishServerDescriptor.


svn:r11569
2007-09-21 22:14:39 +00:00
Roger Dingledine
193a144c9f Make "UpdateBridgesFromAuthority" torrc option work: when bridge
users configure that and specify a bridge with an identity
fingerprint, now they will lookup the bridge descriptor at the
default bridge authority via a one-hop tunnel, but once circuits
are established they will switch to a three-hop tunnel for later
connections to the bridge authority.


svn:r11550
2007-09-21 06:14:36 +00:00
Roger Dingledine
eb9dc12ce9 Drop support for v1 rendezvous descriptors, since we never used
them anyway, and the code has probably rotted by now. Based on
patch from Karsten Loesing.


svn:r11496
2007-09-18 21:17:45 +00:00
Nick Mathewson
a2b76befff r15142@catbus: nickm | 2007-09-18 11:43:32 -0400
Split "Have all the authorities accepted our server descriptor?" into its own function.  Patch from Robert Hogan.


svn:r11482
2007-09-18 15:53:53 +00:00
Nick Mathewson
eb3f24f027 r14358@Kushana: nickm | 2007-09-08 13:45:16 -0400
Implement certificate fetch functions.


svn:r11405
2007-09-08 19:08:39 +00:00
Nick Mathewson
cf2ac9b9e1 r14202@Kushana: nickm | 2007-08-24 09:55:30 -0400
Add purposes for new things we need to fetch for v3 directory system.


svn:r11268
2007-08-24 14:41:06 +00:00
Peter Palfrader
c7140372cb It works better if we don't print a 404 header after our body
svn:r11236
2007-08-20 22:40:09 +00:00
Peter Palfrader
6802923fa7 call it EXPORTMALLINFO, not EXPORTMEMINFO
svn:r11235
2007-08-20 22:31:39 +00:00
Peter Palfrader
8aceafc0c8 Appease check-spaces
svn:r11234
2007-08-20 22:23:22 +00:00
Peter Palfrader
38cbd7263e We do not mix variable declarations and code
svn:r11233
2007-08-20 22:13:14 +00:00
Peter Palfrader
8c3d14cda5 Optionally export mallinfo() output on the DirPort
svn:r11232
2007-08-20 22:11:56 +00:00
Peter Palfrader
f99ac7fe52 Remove /tor/dir-all-weaselhack, it's useless without FULL_V1_DIRECTORIES defined
svn:r11231
2007-08-20 21:56:33 +00:00
Nick Mathewson
181ba71a90 r14051@Kushana: nickm | 2007-08-15 15:55:36 -0400
Fix an XXXX020 and a few DOCDOCs.


svn:r11127
2007-08-15 19:56:01 +00:00