Commit Graph

365 Commits

Author SHA1 Message Date
Nick Mathewson
20b1085989 r16242@catbus: nickm | 2007-10-28 16:28:13 -0400
Implement if-modified-since for consensus networkstatuses so that we do not download duplicates needlessly.


svn:r12258
2007-10-28 20:30:21 +00:00
Roger Dingledine
900ddcb8fd bugfix on r11298:
Fix a minor memory leak whenever we parse guards from our state
file. Bugfix on 0.2.0.7-alpha.


svn:r11862
2007-10-11 02:03:53 +00:00
Roger Dingledine
a5851939c0 i heard that users know the phrase 'system clock' better than 'clock'. hm.
svn:r11820
2007-10-09 21:11:16 +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
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
Nick Mathewson
eca3634f62 r14294@Kushana: nickm | 2007-09-01 13:50:03 -0400
Oops. Initialize "changed" variable when removing obsolete guards.


svn:r11346
2007-09-01 17:50:29 +00:00
Nick Mathewson
4266039c19 r14826@catbus: nickm | 2007-08-29 13:19:55 -0400
Add a line to the state file for each guard to let us know which version added the guard.  If the line is absent, assume the guard was added by whatever version of Tor last wrote the state file.  Remove guards if the version that added them was using a bad guard selection algorithm.  (Previously, we removed guards if the version that wrote the file was using a bad guard selection algorithm, even if the guards themselves were chosen by a good version.) 


svn:r11298
2007-08-29 17:22:00 +00:00
Nick Mathewson
a4cc3e4be1 r14821@catbus: nickm | 2007-08-27 19:57:56 -0400
Check for absent nickname when making extend info.  I still dont know when this happens, but it is easy enough to check for.  Fixes bug 467.


svn:r11293
2007-08-28 00:00:32 +00:00
Nick Mathewson
c3805e753a r14200@kushana: nickm | 2007-08-24 08:33:41 -0400
In new code, let's try to prefer named flags to mazes of twisted boolean arguments, all alike.


svn:r11267
2007-08-24 12:33:53 +00:00
Roger Dingledine
d39c7515d1 patch from mike perry to a) stop overloading guards as much, and
b) raise the max-believable-bandwidth to 10MB/s.


svn:r11258
2007-08-24 06:30:34 +00:00
Roger Dingledine
79066b4851 backport candidate:
Fix a minor memory leak when we fail to find enough suitable
servers to choose a circuit. Bugfix on 0.1.2.x.


svn:r11247
2007-08-22 03:03:24 +00:00
Nick Mathewson
676d8622de r14659@catbus: nickm | 2007-08-18 14:19:34 -0400
When we are loading state info from disk, never believe any date in the future.  Doing so can keep us from retrying guards, rotating onion keys, storing bandwidth info, etc.  Fixes bug 434, and others. Backport candidate, once it has been tested.


svn:r11166
2007-08-18 18:20:42 +00:00
Roger Dingledine
ca7c53d3cc Be even more aggressive about separating local traffic from relayed
traffic when RelayBandwidthRate is set. (Refines proposal 111.)


svn:r10974
2007-07-29 22:13:44 +00:00
Roger Dingledine
eca2a30060 make progress towards retrying our bridges when they're all
down and we get a new socks request


svn:r10967
2007-07-29 04:38:21 +00:00
Nick Mathewson
189bc7cf9f r13920@catbus: nickm | 2007-07-26 16:25:25 -0400
whitespace fixes


svn:r10935
2007-07-26 20:26:53 +00:00
Nick Mathewson
701fce8e5c r13858@catbus: nickm | 2007-07-22 18:44:02 -0400
Fix/note some relatively trivial mem usage issues


svn:r10905
2007-07-22 22:49:49 +00:00
Roger Dingledine
6fc336d217 handle fetching bridge descriptors from the bridge authority too.
svn:r10898
2007-07-22 00:16:48 +00:00
Roger Dingledine
a916e07ea6 when requesting tor/server/authority, ask for tor/server/authority.z
instead. same functionality, saves a bit of bandwidth. and might even
work.


svn:r10896
2007-07-21 22:04:18 +00:00
Roger Dingledine
50487c249d timeout and retry schedules for fetching bridge descriptors
svn:r10867
2007-07-18 10:06:03 +00:00
Roger Dingledine
5c4d86f512 using fascistfirewall and having your bridge on an unreachable
port silently didn't mix. now they loudly don't mix.


svn:r10862
2007-07-18 07:13:15 +00:00
Roger Dingledine
a1ab2c8087 free bridge list on exit; try harder to free buffer freelists on exit.
svn:r10854
2007-07-17 11:33:38 +00:00
Roger Dingledine
99bfb1bebe If there's a never-before-connected-to guard node in our list,
never choose any guards past it. This way we don't expand our 
guard list unless we need to. [Bugfix in 0.1.2.x]

I'm not sure if this will solve all our problems, but it is at least
something.



svn:r10730
2007-07-02 22:15:26 +00:00
Roger Dingledine
237cdfdf48 if we already have a bridge in our state file, it won't be
in the networkstatuses, so we'll mark it unusable when we
load it, and then when we get a new routerinfo for it, we'll
still think it's unusable. fix that.


svn:r10612
2007-06-15 18:32:27 +00:00
Roger Dingledine
07ff5c6785 bugfix on r10609: don't fail asserts when closing circuits
that were connected to an unkeyed connection.


svn:r10611
2007-06-15 16:21:40 +00:00
Roger Dingledine
2cd293dc8f now we can specify a bridge without specifying its key,
and we will still connect to it and use it. getting closer!


svn:r10609
2007-06-15 06:01:04 +00:00
Roger Dingledine
3d641bde0e Refine r10571: more work on bridge stuff.
- Only listen to responses for "authority" fetches if we're configured
    to use Bridges. Otherwise it's safe (and maybe smarter) to silently
    discard them like we used to.
  - React faster to download networkstatuses after the first bridge
    descriptor arrives.
  - Don't do dir fetches before we have any bridges, even when our 
    dirport is open.


svn:r10604
2007-06-15 02:12:15 +00:00
Roger Dingledine
af658b7828 More work towards making bridge users able to connect via bridges:
- demand options->Bridges and options->TunnelDirConns if 
    options->UseBridges is set.
  - after directory fetches, accept descriptors that aren't referenced by
    our networkstatuses, *if* they're for a configured bridge.
  - delay directory fetching until we have at least one bridge descriptor.
  - learn how to build a one-hop circuit when we have neither routerinfo
    nor routerstatus for our destination.
  - teach directory connections how to pick a bridge as the destination
    directory when doing non-anonymous fetches.
  - tolerate directory commands for which the dir_port is 0.
  - remember descriptors when the requested_resource was "authority", 
    rather than just ignoring them.
  - put bridges on our entry_guards list once we have a descriptor for them.
    When UseBridges is set, only pick entry guards that are bridges. Else
    vice versa.


svn:r10571
2007-06-12 09:17:23 +00:00
Roger Dingledine
04995f197d more building blocks towards being able to fetch bridge descriptors
svn:r10548
2007-06-10 07:34:21 +00:00
Roger Dingledine
1ae7708ff8 discard the "bridge list" stubs that i hope i never need.
svn:r10547
2007-06-10 00:30:14 +00:00
Roger Dingledine
8db1b61a26 avoid leaking memory in a path never followed. pointed out
by robert watson.


svn:r10521
2007-06-07 15:07:33 +00:00
Roger Dingledine
42d7b0877d forward-port r10318
svn:r10319
2007-05-24 23:39:04 +00:00
Nick Mathewson
6975a093e9 r12853@catbus: nickm | 2007-05-22 11:36:54 -0400
Make connection_array into a smartlist.


svn:r10292
2007-05-22 15:49:14 +00:00
Roger Dingledine
590a98ff37 clean up r10240 so we avoid the exit node itself too
svn:r10242
2007-05-22 01:20:23 +00:00
Roger Dingledine
6ede110c4d When choosing an entry guard for our circuit, avoid using guards
that are in the same family as the chosen exit -- not just guards
that are exactly the chosen exit. (Reported by lodger.)


svn:r10240
2007-05-22 01:01:24 +00:00
Nick Mathewson
ceac39aa8a r12697@catbus: nickm | 2007-05-09 00:15:40 -0400
Change authority_type_t to a set of flags; use it more consistently.


svn:r10144
2007-05-09 04:15:46 +00:00
Roger Dingledine
07bf274d98 Interim commit: new config options Bridge and UseBridges.
It is becoming increasingly clear to me that bridges should
be a special case of entry guards, not a whole separate pile
of nearly identical functions.


svn:r10141
2007-05-08 11:28:05 +00:00
Roger Dingledine
54f5ab39b3 record the router purpose at each step of the circuit path.
i have the feeling this will come in handy.


svn:r10139
2007-05-08 10:11:53 +00:00
Roger Dingledine
1d3bb103a4 clean up some function argument names
svn:r10138
2007-05-08 10:01:33 +00:00
Nick Mathewson
38c0bb3a99 r12651@Kushana: nickm | 2007-03-24 18:26:42 -0400
Initial version of circuit-based cell queues.  Instead of hammering or_conns with piles of cells, queue cells on their corresponding circuits, and append them to the or_conn as needed.  This seems to work so far, but needs a bit more work.  This will break the memory-use-limitation patch for begin_dir conns: the solution will be a fun but fiddly.


svn:r9904
2007-03-26 14:07:59 +00:00
Nick Mathewson
306d5400c3 r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400
Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit.


svn:r9899
2007-03-24 15:57:51 +00:00
Roger Dingledine
c36a6210a2 put the stopgap on whether we've sent a create cell, not
whether we've attached a stream.


svn:r9883
2007-03-20 03:26:51 +00:00
Nick Mathewson
7fcceb2c25 r12074@catbus: nickm | 2007-03-04 15:11:43 -0500
Make all LD_BUG log messsages get prefixed with "Bug: ".  Remove manually-generated "Bug: "s from log-messages.  (Apparently, we remembered to add them about 40% of the time.)


svn:r9733
2007-03-04 20:11:46 +00:00
Nick Mathewson
1a3e1c5510 r11970@catbus: nickm | 2007-02-27 19:17:27 -0500
Fix a bug found by Udo van den Heuvel: avoid an assertion failure when a controller sets and clears EntryNodes before the next call to choose_random_entry().  Also make a function static.


svn:r9669
2007-02-28 00:23:05 +00:00
Roger Dingledine
50f22e858a doc pedant
svn:r9634
2007-02-24 07:50:38 +00:00
Nick Mathewson
f599adf40a r11909@catbus: nickm | 2007-02-24 02:37:40 -0500
Move tricky "delete the member of the smartlist currently under iteration" logic into its own happyfun macro.


svn:r9633
2007-02-24 07:37:45 +00:00
Roger Dingledine
2015479b5a fix crash introduced in r9622
svn:r9632
2007-02-24 06:44:40 +00:00
Roger Dingledine
d63c58249e make it stop crashing when i exercise the new entrynodes behavior in
r9574. this hack is getting pretty darn hackish; perhaps it's time to
not use SMARTLIST_FOREACH in this situation.


svn:r9629
2007-02-24 04:17:29 +00:00
Nick Mathewson
f1d207b29a r11885@catbus: nickm | 2007-02-23 13:34:24 -0500
Fix an XXXX012: make entry guards _really_ get retried when the network comes back online.


svn:r9622
2007-02-23 18:34:35 +00:00
Nick Mathewson
d2893398f6 r11832@catbus: nickm | 2007-02-16 15:31:59 -0500
Fix 35 remaining DOCDOC comments. Yowza.


svn:r9596
2007-02-16 20:39:37 +00:00
Nick Mathewson
3c691b9da6 r11785@catbus: nickm | 2007-02-12 20:27:48 -0500
Node-picking fixes: Never warn when a down node is listed in a config option (bug 348); always warn when a node in a config option is unnamed.  Also, when entrynodes is configured, then build the guard list as: (parts of EntryNodes that were guards before), (the rest of EntryNodes), (the rest of the old guards).  This last point ensures that EntryNode users will get the EntryNodes they want with the minimum change to their guard list.


svn:r9574
2007-02-13 01:27:55 +00:00