Commit Graph

400 Commits

Author SHA1 Message Date
Nick Mathewson
907fc6c73e r8977@Kushana: nickm | 2006-09-28 19:56:41 -0400
Make "is a v1 authority", "is a v2 authority", and "is a hidden service authority" into separate flags so we can eventually migrate more trust away from moria.


svn:r8523
2006-09-28 23:57:59 +00:00
Peter Palfrader
bc25e87754 r9897@danube: weasel | 2006-09-29 01:08:44 +0200
Add a space in a wrapped log message


svn:r8517
2006-09-28 23:08:54 +00:00
Peter Palfrader
c339bd2713 r9895@danube: weasel | 2006-09-29 01:05:00 +0200
Restore to previous wording that svk merging made me mess up


svn:r8516
2006-09-28 23:05:17 +00:00
Peter Palfrader
14882b3ec0 r9770@danube: weasel | 2006-09-15 07:20:05 +0200
router_set_networkstatus() gets a list of status documents we asked for from
 connection_dir_client_reached_eof().  However, as a cache we (sometimes?) just
 ask for "all".  router_set_networkstatus() would freak out over that, meaning
 it would log a warning and drop the status document instead of caching it
 as it is supposed to.  Now we let router_set_networkstatus() know if the
 data comes from an all-request so it can do the right thing.


svn:r8513
2006-09-28 22:58:58 +00:00
Roger Dingledine
ad430b9561 checkpoint changelog and general polishing
svn:r8497
2006-09-25 05:59:13 +00:00
Peter Palfrader
ba091ae5d7 r9770@danube: weasel | 2006-09-15 07:20:05 +0200
router_set_networkstatus() gets a list of status documents we asked for from
 connection_dir_client_reached_eof().  However, as a cache we (sometimes?) just
 ask for "all".  router_set_networkstatus() would freak out over that, meaning
 it would log a warning and drop the status document instead of caching it
 as it is supposed to.  Now we let router_set_networkstatus() know if the
 data comes from an all-request so it can do the right thing.


svn:r8398
2006-09-15 05:20:16 +00:00
Roger Dingledine
e56dbb810f start remembering X-Your-Address-Is hints even if you're
a client, so you can become a server more smoothly.


svn:r8359
2006-09-09 19:36:51 +00:00
Nick Mathewson
ec82db6995 r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400
Clean up wide lines from last patch.


svn:r6907
2006-07-26 19:07:37 +00:00
Nick Mathewson
4ff4577beb r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
Refactor connection_t into edge, or, dir, control, and base subtypes.  This might save some RAM on busy exit servers, but really matters most in terms of correctness.


svn:r6906
2006-07-26 19:07:26 +00:00
Roger Dingledine
40cc536307 rewrite conn->address for GET commands as well as POST commands.
svn:r6815
2006-07-23 06:41:02 +00:00
Roger Dingledine
c055a34cdb huge bugfix: we weren't ever writing an http header when sending
out network statuses! so clients were downloading the whole thing,
and then discarding them because they're malformed.


svn:r6778
2006-07-17 08:11:27 +00:00
Roger Dingledine
9db7b2c068 Allow servers with no hostname or IP address to learn their IP address
by asking the directory authorities. This code only kicks in when you
would normally have exited with a "no address" error.

This design is flawed, though, since the X-Your-Address-Is header is not
authenticated, and doing it this way introduces too many new attacks. The
right answer is to give IP address hints inside the HELLO cell; much of
this code can be reused when we switch.


svn:r6774
2006-07-17 06:35:06 +00:00
Roger Dingledine
3d79eb52ab stick to nick's nul/null convention
svn:r6763
2006-07-15 19:21:30 +00:00
Roger Dingledine
85fd582192 rename X-You-Are to something slightly better.
svn:r6735
2006-07-06 03:05:01 +00:00
Roger Dingledine
7f01dc9c1c whitespace/tab fixes
svn:r6734
2006-07-06 02:45:46 +00:00
Roger Dingledine
4fc7426b93 Make the X-You-Are header more accurate when there's a proxy in the middle.
svn:r6722
2006-07-04 18:18:08 +00:00
Nick Mathewson
9fce316d1c Oops. Headers work better when named right.
svn:r6707
2006-07-01 21:51:21 +00:00
Nick Mathewson
60de51993a Unify HTTP response code into one place so it is easier to add headers. Add an X-You-Are header, which we should probably rename. NOTE that we should not use this field for things where it matters if dirs lie.
svn:r6705
2006-06-30 10:50:43 +00:00
Nick Mathewson
4b49d298eb complete_only == !allow_partial. This enables useful use of partial desc downloads. Backport candidate
svn:r6700
2006-06-29 11:04:42 +00:00
Nick Mathewson
52b8dfa95a Fix a bunch of spaces.
svn:r6678
2006-06-22 07:25:15 +00:00
Nick Mathewson
b7910202a3 Next batch of memory miserdom: mmap cached-routers file. This is sure to break somewhere.
svn:r6675
2006-06-22 07:01:54 +00:00
Nick Mathewson
e2697a62ac When requesting or serving resources via fingerprint/digest, request and respond in-order, removing duplicates.
svn:r6673
2006-06-21 04:57:12 +00:00
Nick Mathewson
4283b81a48 Start spooling v2 networkstatus docs as well.
svn:r6664
2006-06-20 00:48:23 +00:00
Nick Mathewson
537104c908 write_to_buf != connection_write_to_buf. Also, add a connection_write_to_buf_zlib wrapper that sucks.
svn:r6650
2006-06-18 08:46:55 +00:00
Nick Mathewson
b9013cbe98 And actually check the url when it exists. that might work better.
svn:r6646
2006-06-18 08:16:05 +00:00
Nick Mathewson
c374340c70 That dir_refresh_src fix will only work if I enable it.
svn:r6645
2006-06-18 08:13:45 +00:00
Nick Mathewson
347bcec84a Fix a couple of bugs in last patch.
svn:r6644
2006-06-18 08:07:16 +00:00
Nick Mathewson
1d9923da7c Instead of adding servers and v1 directories to buffers en masse, directory servers add them on the fly as their outbufs are depleted. This will save ram on busy dirservers.
svn:r6641
2006-06-18 07:38:55 +00:00
Peter Palfrader
2ff24dbc26 And a minor bugfix to the weaselhack
svn:r6629
2006-06-15 23:14:01 +00:00
Roger Dingledine
af0e47c921 fix spacing
svn:r6628
2006-06-15 22:59:07 +00:00
Peter Palfrader
bc64becd12 Add a /tor/dir-all-weaselhack directory resource so I do not have to update my scripts
svn:r6627
2006-06-15 22:52:56 +00:00
Nick Mathewson
853e2d99b6 Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
svn:r6532
2006-06-04 22:42:13 +00:00
Nick Mathewson
6ebd886511 forward-port: "Resolve" all XXX011 items, mostly by marking them non-011.
svn:r6396
2006-04-18 03:07:24 +00:00
Nick Mathewson
e258276c2b Change a dumb interface. Also, increment trusted_dir_server_t.n_networkstatus_failures when an all.z download fails entirely or partially.
svn:r6345
2006-04-10 01:35:56 +00:00
Roger Dingledine
760934b175 fix typo
svn:r6340
2006-04-09 10:43:03 +00:00
Roger Dingledine
d48cdbe2e0 When fetching rendezvous descriptors, we were willing to ask
v2 authorities too. And of course they did not have a copy.


svn:r6331
2006-04-09 00:36:15 +00:00
Roger Dingledine
6fb27741ba Fix dirserv_get_networkstatus_v2's api: its function comments
did not at all match its behavior, and I can't think of a case
when it should return anything other than 0.

This fix may allow getinfo dir/status/foo to work.


svn:r6285
2006-04-01 22:00:49 +00:00
Peter Palfrader
03302dc67d On our dirport return a robots.txt so maybe google doesn't index all those server descriptors anymore
svn:r6252
2006-03-27 07:33:13 +00:00
Roger Dingledine
6f08d121d9 Refactor and consolidate addr/exit policies into a new policies.c.
Fix some minor bugs and memory leaks along the way.


svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
0d7efbe65d Note a vulnerability with our current recommended-version concensus
building.

Make the warnings about invalid and unnamed nodes scale better, and
update the text of the warnings.

Change router_have_minimum_dir_info() to only be happy when it has
enough network-statuses ("more than half") to be willing to actually
build circuits.

Not yet done: when we fail to get a networkstatus that we wanted, and
!router_have_minimum_dir_info(), we should retry it quicker than a whole
minute from now.


svn:r6227
2006-03-22 06:22:12 +00:00
Roger Dingledine
581795f41d auth dir servers were only modifying a server's is_running field
when they created a network status. so if nobody asked for a
network status, they would never discover that any servers are
is_running, so they could never build a circuit.


svn:r6183
2006-03-18 01:24:04 +00:00
Nick Mathewson
474c60b743 Cleanup on time-relaqted constants. New conventions:
1) Surround all constants by (parens), whether we'll be using them
     in a denominator or not.
  2) Express all time periods as products (24*60*60), not as multiplied-out
     constants (86400).
  3) Comments like "(60*60) /* one hour */" are as pointless as comments
     like "c = a + b; /* set c to the sum of a and b */".  Remove them.
  4) All time periods should be #defined constants, not given inline.
  5) All time periods should have doxygen comments.
  6) All time periods, unless specified, are in seconds.  It's not necessary
     to say so.

To summarize, the old (lack of) style would allow:

  #define FOO_RETRY_INTERVAL 60*60 /* one hour (seconds) */
  next_try = now + 3600;

The new style is:

  /** How often do we reattempt foo? */
  #define FOO_RETRY_INTERVAL (60*60)

  next_try = now + RETRY_INTERVAL;


svn:r6142
2006-03-12 22:48:18 +00:00
Roger Dingledine
d80d5370e0 when we get funny-looking lines on our dirport, shut up about it.
svn:r6135
2006-03-12 04:36:17 +00:00
Nick Mathewson
5777ee0e1a Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
2006-03-05 09:50:26 +00:00
Roger Dingledine
25ed4b66e3 be quieter about hidserv descriptors that are too old or too new.
we can't do anything about them anyway.


svn:r6073
2006-02-21 06:23:57 +00:00
Roger Dingledine
6a52867846 New config options to address bug 251:
FetchServerDescriptors and FetchHidServDescriptors for whether
to fetch server info and hidserv info or let the controller do it,
and also PublishServerDescriptor and PublishHidServDescriptors.

Add AllDirActionsPrivate undocumented option -- if you set it, you'll
need the controller to bootstrap you enough to build your first circuits.


svn:r6047
2006-02-19 22:02:02 +00:00
Roger Dingledine
266254f42b clean up the Reachable*Addresses changes
svn:r6041
2006-02-19 08:31:47 +00:00
Peter Palfrader
5eea6c76df Split ReachableAddresses into ReachableDirAddresses and ReachableORAddresses
svn:r6009
2006-02-13 21:17:20 +00:00
Roger Dingledine
aa63a84fe1 the things we do for our windows users.
i hope they appreciate it.


svn:r6004
2006-02-13 09:37:53 +00:00
Roger Dingledine
b99f903e34 and don't warn when it happens here either, unless the user
wants to hear it.


svn:r5990
2006-02-12 23:44:02 +00:00