Commit Graph

313 Commits

Author SHA1 Message Date
Nick Mathewson
ab2fc7bd62 r11596@Kushana: nickm | 2006-12-15 10:57:12 -0500
Mark some TODO items as done.  Also, never include ourself in our family list.


svn:r9131
2006-12-15 21:26:15 +00:00
Roger Dingledine
c4ed331d8d oh, and catch the other instance we should fix
svn:r9122
2006-12-15 08:14:32 +00:00
Roger Dingledine
0bc0688668 if we rotate our onion key, publish a new descriptor, and
die soon after, we want to stick with that onion key when
we restart.


svn:r9121
2006-12-15 07:58:31 +00:00
Nick Mathewson
38bd6837db r11588@Kushana: nickm | 2006-12-15 02:04:32 -0500
Add a LastRotatedOnionKey variable to the state file, so we can rotate onion keys a week after they change even if we never stay up for a whole week at a time.  Should fix bug 368.


svn:r9120
2006-12-15 07:04:37 +00:00
Roger Dingledine
97c83a4c09 finish enabling begin-dir cells. require one-hop circs for
socks-command-connect-dir streams, so we don't open new anonymity
questions.


svn:r9099
2006-12-13 02:49:45 +00:00
Roger Dingledine
0dbf725927 Infrastructure to test BEGIN_DIR cells.
New socks command CONNECT_DIR. New config option TunnelDirConns that
builds a circ ending at the directory server and delivers a BEGIN_DIR
cell if it's running 0.1.2.2-alpha or later. We still need to make
one-hop circs when appropriate, while making other conns avoid them.


svn:r9098
2006-12-13 00:28:56 +00:00
Roger Dingledine
ab68e312bd actually, i think this fix was closest to what i originally
intended. this way we don't call resolve-my-address, which
yells and screams if we're using an internal address (mere
clients should not have to care).


svn:r8998
2006-11-26 20:01:45 +00:00
Nick Mathewson
116ae04c2d r9399@totoro: nickm | 2006-11-26 14:22:17 -0500
Actually, clients *should* try to guess their addresses.


svn:r8997
2006-11-26 19:22:25 +00:00
Nick Mathewson
68142b18cd r9396@totoro: nickm | 2006-11-26 13:36:29 -0500
Fix router_new_address_suggestion() so it only changes last_guessed_ip() when it actually calls resolve_my_address(). (bug found by dev-girl)


svn:r8996
2006-11-26 18:36:51 +00:00
Nick Mathewson
1bf1f9d2fc r9449@Kushana: nickm | 2006-10-31 00:12:02 -0500
Dump breakdown of PK operations when we get a USR2 signal.  This should help us figure out of we are doing some of them for stupid reasons.


svn:r8881
2006-10-31 19:17:07 +00:00
Nick Mathewson
829bf4dcd0 r8970@totoro: nickm | 2006-10-09 10:12:53 -0400
Win32 patch from Matt Edman: fix compilation bugs by casting to int; defining SSIZE_T; defining USE_TWOS_COMPLEMENT in windows orconfig.h; and using the proper names for win32 functions on GetProcAddress. Also fixes bug 295.


svn:r8669
2006-10-09 15:46:21 +00:00
Nick Mathewson
c6f2d725d0 r8957@totoro: nickm | 2006-10-08 22:35:17 -0400
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed.  This removes some dead code and some potential bugs. Thanks to pnx.


svn:r8664
2006-10-09 02:35:51 +00:00
Roger Dingledine
06e5b2283c minor cleanups
svn:r8622
2006-10-07 00:50:39 +00:00
Roger Dingledine
baf208d7b3 bugfix: When testing reachability of our dirport, don't launch a new
test if there's already one in progress.


svn:r8604
2006-10-06 04:02:27 +00:00
Nick Mathewson
6e0b90a902 r8838@totoro: nickm | 2006-10-02 15:24:39 -0400
Partial implementation of revised nickname syntax for controllers.  Implement ability to look up routers by "verbose" nicknames; add a per-v1-control-connection flag to turn the feature on in events.  Needs testing, spec, ability to actually turn on the flag, double-checking that we wont overflow any nickname buffers, and changelog.


svn:r8582
2006-10-03 18:58:40 +00:00
Roger Dingledine
a3efc8e3d1 - V1 authorities should set "HSAuthoritativeDir 1" to continue being
hidden service authorities too.
- Just because your DirPort is open doesn't mean people should be
  able to remotely teach you about hidden service descriptors. Now
  only accept rendezvous posts if you've got HSAuthoritativeDir set.


svn:r8573
2006-10-01 22:16:55 +00:00
Roger Dingledine
e6f4431722 stop trying to hammer router_rebuild_descriptor() when we don't
have a public address we like yet.


svn:r8554
2006-09-30 20:40:26 +00:00
Nick Mathewson
c2d304366b r9032@Kushana: nickm | 2006-09-29 18:51:42 -0400
Now, all log messages should be distinct.


svn:r8545
2006-09-29 22:51:47 +00:00
Nick Mathewson
7d366f61cb r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400
Differentiate more duplicated log entries


svn:r8542
2006-09-29 22:33:40 +00:00
Nick Mathewson
0335bd51d3 r9005@Kushana: nickm | 2006-09-29 10:37:55 -0400
Implement DESCCHANGED event to tell controller when our router descriptor changes.


svn:r8533
2006-09-29 18:13:25 +00:00
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
Nick Mathewson
adade79f68 r8879@Kushana: nickm | 2006-09-21 17:20:31 -0400
Oops from earlier patch; add "opt eventdns" to unittests, fix bug in routerdesc generation.


svn:r8444
2006-09-21 21:49:03 +00:00
Nick Mathewson
a942441615 r8872@Kushana: nickm | 2006-09-21 14:00:20 -0400
Implement server-side reverse DNS using eventdns.  Add an option to routerdescs so we can tell which servers have eventdns enabled.


svn:r8437
2006-09-21 21:48:06 +00:00
Nick Mathewson
5ebb949c9f Stop searching routerlist for routers with the same identity as other routers (on router insert): we already have a map for that. (We need to add an index field to routerinfo_t so we can figure out which point in the routerlist to replace.) Also, add a comment to routerlist.c; arma, please advise?
svn:r8432
2006-09-19 23:18:30 +00:00
Roger Dingledine
bfa78b3dea actually, do the bandwidth test anyway, if you've been up at
least 6 hours at your previous address.


svn:r8403
2006-09-15 18:07:11 +00:00
Roger Dingledine
a51ec44466 avoid thrashing the bandwidth exercise when we change IPs a lot.
(we avoid simply by not doing any new tests when we change IPs --
it looks like we retain our previous bandwidth estimates, so there's
no need to do new exercise. though in some cases new exercises may
still be useful. one day we'll do something smarter.)


svn:r8402
2006-09-15 18:03:53 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Roger Dingledine
769f9201a6 Send out a burst of long-range drop cells after we've established that
we're reachable. Spread them over 4 circuits, so hopefully a few will
be fast. This exercises our bandwidth and bootstraps us quicker.


svn:r8399
2006-09-15 05:30:25 +00:00
Nick Mathewson
e58b9c1151 r8819@Kushana: nickm | 2006-09-15 00:27:45 -0400
Implement a smartlist_uniq() that will with luck not end the world.


svn:r8396
2006-09-15 04:27:58 +00:00
Peter Palfrader
2cf6cfe189 r9758@danube: weasel | 2006-09-14 07:10:12 +0200
Add a comment


svn:r8391
2006-09-14 05:17:02 +00:00
Peter Palfrader
7fcec09560 r9753@danube: weasel | 2006-09-14 07:07:02 +0200
Remove duplicates from MyFamily


svn:r8390
2006-09-14 05:07:34 +00:00
Peter Palfrader
984e8f6efb r9736@danube: weasel | 2006-09-14 05:53:06 +0200
Refactor dirserv_parse_fingerprint_file(fname) into dirserv_load_fingerprint_file():
 There is not need to put together the path to the approved-routers file in more than one place.


svn:r8386
2006-09-14 04:53:23 +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
Roger Dingledine
5f6351ceb3 fix typo, add log message
svn:r8357
2006-09-09 19:16:07 +00:00
Roger Dingledine
29b6d6560e add a "getinfo address" controller command.
svn:r8354
2006-09-09 03:18:39 +00:00
Roger Dingledine
43edbf0461 prefer calling it a client rather than an OP
svn:r8334
2006-09-07 01:00: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
e1f30a5f21 when we find our dirport to be reachable, mark our descriptor
dirty so we'll tell the world. (fixes bug 306 reported by pnx)


svn:r6787
2006-07-18 03:06:55 +00:00
Roger Dingledine
ac258d2cc8 Start publishing one minute or so after we find our ORPort
to be reachable. This will help reduce the number of descriptors
we have for ourselves floating around, since it's quite likely
other things (e.g. DirPort) will change during that minute too.


svn:r6786
2006-07-18 03:06:12 +00:00
Roger Dingledine
c85745cfe2 parameterize the loudness of log_addr_has_changed(), since it's the
only place where we inform the user of a new IP address, if we're
guessing it from external sources.


svn:r6780
2006-07-17 19:33:54 +00:00
Roger Dingledine
542adb88d7 Make a louder statement the first time we learn a guessed
IP address.


svn:r6779
2006-07-17 08:17:51 +00:00
Roger Dingledine
a2a89da693 and don't try to build the descriptor every second, if it's dirty
but we don't have a known address.


svn:r6777
2006-07-17 06:59:56 +00:00
Roger Dingledine
42e2057d67 fix some more places where we shouldn't crash if we can't build
our own descriptor yet.


svn:r6775
2006-07-17 06:54:28 +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
ee5f512e13 parameterize the loudness of resolve_my_address(), and call things
IP addresses, not IPs.


svn:r6764
2006-07-15 20:26:05 +00:00
Roger Dingledine
05d0b70573 Get rid of the router_retry_connections notion. Now routers no longer
try to rebuild long-term connections to directory authorities, and
directory authorities no longer try to rebuild long-term connections to
all servers.

We still don't hang up connections in these two cases though -- we need
to look at it more carefully to avoid flapping, and we likely need to
wait til 0.1.1.x is obsolete.


svn:r6712
2006-07-04 03:31:27 +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
Roger Dingledine
2cd349903c be more lax about recognizing valid hexdigests.
svn:r6619
2006-06-13 12:05:59 +00:00
Roger Dingledine
0bfef523df simplify the tortls api: we only support being a "server", that
is, even tor clients do the same sort of handshake.

this has been true for years, so it's best to get rid of the
stale code.


svn:r6557
2006-06-07 06:10:54 +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