Nick Mathewson
edf5698474
Start dividing log messages into logging domains. No, LD_ is not the best of identifiers. src/or has not been converted yet. Domains dont do anything yet.
...
svn:r5284
2005-10-18 21:58:19 +00:00
Peter Palfrader
e54efb1655
I think nick meant to compare r2->platform the second time
...
svn:r5282
2005-10-18 21:19:48 +00:00
Peter Palfrader
0d5c007266
Fix tor26's first segfault
...
svn:r5281
2005-10-18 21:19:02 +00:00
Nick Mathewson
d25873ae9c
Use a digestmap_t to speed up router_get_by_digest, which was previously a bottleneck (~~27% CPU)
...
svn:r5280
2005-10-18 20:13:09 +00:00
Nick Mathewson
3347c1741d
Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
...
svn:r5276
2005-10-18 17:43:54 +00:00
Nick Mathewson
6101468cbe
Enable trivial "download by descriptor digest" functionality.
...
svn:r5250
2005-10-14 04:56:20 +00:00
Nick Mathewson
aac738d2be
When no descriptors changed, do not send a NEWDESC event.
...
svn:r5244
2005-10-12 19:41:16 +00:00
Nick Mathewson
972b7512c7
authorities do not replace server descriptors where nothing semantically relevant has changed since the last upload.
...
svn:r5240
2005-10-12 18:25:25 +00:00
Nick Mathewson
fd9bfef13b
Funny. I could have sworn it compiled this morning when I checked it in.
...
svn:r5239
2005-10-12 17:16:25 +00:00
Nick Mathewson
a7ca56b537
More work towards a sane digest-based liveness testing.
...
svn:r5238
2005-10-12 13:49:13 +00:00
Nick Mathewson
2b3a7b818f
Add an as-yet-unused "EXTENDED" flag to SETEVENTS to indicate that the client can handle extra labeled info in its events. Add moreinfo to the "what is ready for downloading" msg so we can investigate digest-related download rules
...
svn:r5237
2005-10-12 04:31:44 +00:00
Nick Mathewson
08e4f132a8
add some docs; if warn_if_unnamed is 0, really do not warn.
...
svn:r5234
2005-10-11 01:57:28 +00:00
Nick Mathewson
d7b04a8788
do not try to download a routerdesc if we would immediately reject it as obsolete.
...
svn:r5225
2005-10-07 22:00:09 +00:00
Nick Mathewson
cc35e1720f
Using RAND_pseudo_bytes instead of RAND_bytes is an accident waiting to happen, and does not really speed us up much when we do it. So stop doing it.
...
svn:r5210
2005-10-06 22:18:01 +00:00
Nick Mathewson
56be5a9706
I *knew* something was wrong here. Flip some comparison operators and make download-rate-limiting sane again.
...
svn:r5201
2005-10-05 22:36:18 +00:00
Nick Mathewson
1ebbaf5c3a
improve INFO-level logging for directory downloads. This is still too chatty, but it will help us analyze things.
...
svn:r5197
2005-10-05 20:45:18 +00:00
Nick Mathewson
370e4abdc9
replace former relaunches of directory downloads with reset of failure count and relaunch of status downloads. Fix memory leak in trusted_dir_server_t. Reset "last download attempted" time when resetting failure counts.
...
svn:r5195
2005-10-05 05:03:52 +00:00
Nick Mathewson
509de69a7e
reset warning flags on SIGHUP. arma: is this everything?
...
svn:r5192
2005-10-05 02:20:46 +00:00
Nick Mathewson
8434595584
Fix verbose compiler warnings, including one in routerlist.c that would have been an actual error. Normalize whitespace. Enforce convention that "address" is a hostname and "addr" is an IPv4 address.
...
svn:r5190
2005-10-05 02:06:36 +00:00
Nick Mathewson
0924094042
resolve some directory-related XXXXs; downgrade naming conflict messages from WARN to INFO for non-authorities; do not repeat naming conflict messages.
...
svn:r5189
2005-10-05 01:53:44 +00:00
Nick Mathewson
1223310b69
Downgrade noisy log messages in preparation for an alpha release.
...
svn:r5188
2005-10-05 01:27:08 +00:00
Nick Mathewson
61ea516885
Check for named servers when looking them up by nickname;
...
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.
Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.
Try to list MyFamily elements by key, not by nickname.
Only warn about names that we generated ourself, or got from the local
user.
On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.
svn:r5185
2005-10-04 22:23:31 +00:00
Nick Mathewson
2d203fdcf3
link nicknames to trusted directory servers; log these nicknames when mentioning servers; also, when we get a naming conflict; log which nicknames or keys are supposed to bind.
...
svn:r5184
2005-10-04 21:21:09 +00:00
Nick Mathewson
b10df0d595
cosmetic fix: only have one local to hold smartlist_len(downloadable), not too.
...
svn:r5183
2005-10-04 20:18:26 +00:00
Nick Mathewson
808e584a87
remove a never-used smartlist in routerlist.c
...
svn:r5176
2005-09-30 21:38:45 +00:00
Nick Mathewson
23864ad423
Try to hunt down a few more leaks
...
svn:r5172
2005-09-30 21:22:25 +00:00
Nick Mathewson
5333a3b838
fix a small filename leak
...
svn:r5170
2005-09-30 21:11:22 +00:00
Nick Mathewson
8408006318
fix a memory leak on exit in routerlist.c
...
svn:r5169
2005-09-30 21:04:52 +00:00
Nick Mathewson
fc3c0197f9
Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download.
...
svn:r5166
2005-09-30 20:04:55 +00:00
Roger Dingledine
8fc9330686
fix typo
...
svn:r5151
2005-09-29 23:03:34 +00:00
Nick Mathewson
abb8576538
But, of course, mirrors should get the most up-to-date server in any case.
...
svn:r5135
2005-09-23 21:33:59 +00:00
Nick Mathewson
b726507d36
Log even less verbosely. Also, do not download old (frequently-updating) servers more than once every 2 hours.
...
svn:r5134
2005-09-23 21:25:29 +00:00
Nick Mathewson
18a0a0e458
Oops. It looks like some old GCCs dislike #if inside a macro argument.
...
svn:r5131
2005-09-23 20:31:07 +00:00
Nick Mathewson
c345dab3bd
Fix logic error (people who ask authorities should never split; others should always split). Also, fix timing error in main.c so retries really happen.
...
svn:r5127
2005-09-23 18:17:37 +00:00
Nick Mathewson
a1f1c4bf6b
Re-enable autosplitting, but authorities and mirrors should not do it, and make the cutoff higher than 1.
...
svn:r5126
2005-09-23 18:08:31 +00:00
Nick Mathewson
f995edd516
Fix at least one overzealous download bug. (tor_malloc_zero new local_routerstatus_t objs); add a pile of logs back in; probe every 10sec; never autolaunch on failure. Let us see if this works better.
...
svn:r5125
2005-09-23 18:05:14 +00:00
Nick Mathewson
9050480339
Fix some compiler warnings
...
svn:r5124
2005-09-23 17:11:20 +00:00
Roger Dingledine
2d6b36a001
get rid of a noisy debug log
...
svn:r5111
2005-09-22 20:51:45 +00:00
Nick Mathewson
cdc912714e
I love the smell of C in the morning. Make router-download rules smarter (download more so long as we dont duplicate existing requests; relaunch at staggered intervals); relaunch one a minute or on failure; reset 60 minutes; always open 3 requests if we can; add authority opinion to networkstatus; make naming rule correct. There is a remaining bug where we retry servers too quickly; We need to look at that harder.
...
svn:r5110
2005-09-22 06:34:29 +00:00
Nick Mathewson
6693031947
Use a separate type for "local view of router status". Also, even though I told arma there was no need, replace an ugly O ( n lg n ) algorithm with a nice O ( n ) algorithm when stepping through servers. Some ugliness is just too bad to stand.
...
svn:r5109
2005-09-22 01:51:14 +00:00
Nick Mathewson
72915546cd
Only check versions from versioning authdirs.
...
svn:r5101
2005-09-21 02:38:51 +00:00
Nick Mathewson
20b9111266
Implement new version handling code.
...
svn:r5100
2005-09-21 00:41:06 +00:00
Nick Mathewson
837b223c8c
remove some debugging garbage
...
svn:r5092
2005-09-18 04:32:58 +00:00
Nick Mathewson
283032960d
Make give-up-on-failure actually work: it seems the servers gave me a real test case.
...
svn:r5091
2005-09-18 04:15:39 +00:00
Nick Mathewson
d118d5069a
Prevent a "try forever to download an unobtainable descriptor" bug. Still remaining: the "give up forever" bug.
...
svn:r5090
2005-09-18 02:51:12 +00:00
Nick Mathewson
87f6d526fe
Refactor new directory code a bit. Keep a big list of rolled-up router status info, including # of download failures (not yet used). Update this list from networkstatuses when they arrive, then update routers from this list. Only download 128 routers at a time, to avoid gargantuan URLs.
...
svn:r5089
2005-09-18 02:24:42 +00:00
Nick Mathewson
1fbe499bfe
Remove a bunch of #if0d code that I no longer need to look at.
...
svn:r5083
2005-09-16 16:47:20 +00:00
Nick Mathewson
6d15a73548
Resolve/expand some XXXXs and improve a log message or two
...
svn:r5082
2005-09-16 16:41:45 +00:00
Nick Mathewson
538740e362
Fix the never-marked-anything-as-running bug. Now Tor builds circuts again. Woo.
...
svn:r5080
2005-09-16 04:53:28 +00:00
Nick Mathewson
1a786a297f
Fix the confusing bug where we were downloading only the first n/2-1 of the servers we actually wanted.
...
svn:r5078
2005-09-16 04:43:21 +00:00
Nick Mathewson
05bab28c7d
Add some (notice, for now) log messages that imply confusing things are happening.
...
svn:r5076
2005-09-15 21:11:48 +00:00
Nick Mathewson
e72e76cad6
Make authdirs smarter. Reject/invalidate by key and IP. Remember that not every authdir has to be a naming authdir.
...
svn:r5074
2005-09-15 14:39:05 +00:00
Nick Mathewson
ed21abfe87
And some documentation before bed.
...
svn:r5073
2005-09-15 06:15:31 +00:00
Nick Mathewson
b70c229f6e
make some functions static; clean dead networkstatus entries more often.
...
svn:r5072
2005-09-15 05:41:30 +00:00
Nick Mathewson
b16048917c
Stop downloading directories and download routers instead. This still needs some work, but at last clients are finally on the new architecture. Next comes the tuning and bugfixing.
...
svn:r5070
2005-09-15 05:19:38 +00:00
Nick Mathewson
e83e1df811
separate validation from naming in authoritative directory servers; simplify some router-management code.
...
svn:r5069
2005-09-15 00:51:42 +00:00
Nick Mathewson
d4e0af7822
Fix a bunch of log messages. Deprecate some routerlist fields; remove others, and status_set_at from routerinfo_t. Compress routerlist.c cleanup functions. Update cached networkstatus mtime when we download the same one twice. Change some interfaces.
...
svn:r5068
2005-09-14 23:42:06 +00:00
Nick Mathewson
27bbfe9dcf
Would you believe that the software_versions field of routerlist_t was never actually used for anything?
...
svn:r5064
2005-09-14 21:38:05 +00:00
Nick Mathewson
e3adcbdb95
Big commit: clients start downloading and using network-statuses.
...
Only caches need to get running-routers; nobody needs to parse, store,
or use it. Same for the router-status line in the directories. Add
many #if 0's that can get removed once I'm convinced they don't
contain anything I'm forgetting.
Start all newly-parsed routers as non-running and non-valid; update
them from the list of network statuses.
Update all routers when a new networkstatus comes in.
After 3 tries for a networkstatus, clients give up until they're told
to try again.
"Let's get those missles ready to **DESTROY THE UNIVERSE**!"
-TMBG
svn:r5063
2005-09-14 21:09:25 +00:00
Nick Mathewson
d9ee94543e
Declare 0.1.1.7 as The Version With The Good Dirservers.
...
svn:r5061
2005-09-14 19:12:35 +00:00
Nick Mathewson
890847d232
I forgot -- smart kids make their code compile.
...
svn:r5032
2005-09-13 21:18:00 +00:00
Nick Mathewson
4efa652a98
add docs, fix whitespace, and make ANY rule in routerparse a little tighter.
...
svn:r5031
2005-09-13 21:14:55 +00:00
Nick Mathewson
76351b8416
Fix DOCDOC entries in routerlist.c. Make more functions use SMARTLIST_FOREACH instead of raw loops. Replace router_list_superseded implementation with one that has a prayer of working.
...
svn:r5027
2005-09-13 15:32:03 +00:00
Nick Mathewson
29c57b54d4
Add functions to extend and compress new router store logic. (Basic idea: use a journal of newly received router descriptors, and periodically replace the old file. This avoids the "too many files" problem and the "too many rewrites" problem.)
...
svn:r5025
2005-09-13 06:21:10 +00:00
Nick Mathewson
3dc5e77b58
Numerous changes to move towards client-side v2 directories.
...
connection.c:
- Add some more connection accessor functions to make directory
download redundancy checking work.
directory.c, or.h, router.c, routerlist.c:
- Start on logic to note when networkstatus downloads fail.
dirserv.c, routerlist.c, routerparse.c:
- Start maintaining an is_named field in routerstatus_t. Don't
actually look at it yet.
dirserv.c, routerlist.c:
- Remove expired networkstatus objects.
or.h:
- Make some booleans into bitfields
- Add prototypes
routerlist.c:
- Sort networkstatus list by publication time
- Function to remove old (older than 10 days) networkstatus objects.
- Function to set a list of routerinfo_ts' status info from the
current set of networkstatus objects.
- Function to tell which routerinfos we need to download based no the
current set of networkstatus objects.
- Do not launch a networkstatus download if a redundant one is in progress.
routerparse.c:
- Keep router entries in networkstatus sorted by digest.
svn:r5012
2005-09-12 06:56:42 +00:00
Roger Dingledine
b0a5ba4248
downgrade the dirserver log messages when whining about unreachability
...
svn:r4991
2005-09-10 20:40:16 +00:00
Nick Mathewson
d410c49965
Clean up some more fingerprint-checking logic
...
svn:r4954
2005-09-08 21:39:39 +00:00
Roger Dingledine
e28931dc94
unused variable
...
svn:r4949
2005-09-08 21:12:53 +00:00
Nick Mathewson
4528bbfd9f
Resolve some XXXs. Add some others.
...
svn:r4947
2005-09-08 21:01:24 +00:00
Nick Mathewson
18e4d78354
Fix an assert in directory.c. Check received network-status objects against the list we expected to get. Do not let anyone else update our network-status object.
...
svn:r4945
2005-09-08 20:36:40 +00:00
Nick Mathewson
059148f588
Only caches download network-status for now, and they use a different strategy. Add an element to connection_t to remember what we are downloading, and a function to recognize our own fingerprint.
...
svn:r4944
2005-09-08 20:18:15 +00:00
Nick Mathewson
df79dc673b
Remove sneaky double declaration.
...
svn:r4941
2005-09-08 19:18:55 +00:00
Nick Mathewson
0f94aa2ea1
Write status to disk in the right place
...
svn:r4940
2005-09-08 19:16:16 +00:00
Nick Mathewson
1e2f1679c8
Fix some more bugs; add a temporary log.
...
svn:r4936
2005-09-08 18:46:25 +00:00
Nick Mathewson
3a99927859
Make directory download code slightly less likely to segfault or assert.
...
svn:r4929
2005-09-08 16:18:28 +00:00
Nick Mathewson
f50ddfd4dd
Download network-status at regular intervals. The code is probably iffy, and the constants need to be renamed.
...
svn:r4921
2005-09-08 06:22:44 +00:00
Nick Mathewson
9e76eae810
add missing return
...
svn:r4913
2005-09-07 17:18:52 +00:00
Nick Mathewson
5c6c88e76d
More stuff for new directories.
...
- Distinguish v1 authorities (all currently trusted directories) from
v2 authorities (all trusted directories).
- Add configuration option for which dirs are v1 authories.
- Add configuration option for whether to be a v1 authority.
- Make trusted dirserver selection functions take options to
choose which functionality we need.
- Remove option when getting directory cache to see whether they
support running-routers; they all do now. Replace it with one
to see whether caches support v2 stuff.
- Parse, cache, and serve network-status objects properly.
- Serve compressed groups of router descriptors. The compression logic
here could be more memory-efficient.
-
svn:r4911
2005-09-07 16:42:53 +00:00
Nick Mathewson
1e37ec4782
Comment structs, reload a field, start making network status caches work
...
svn:r4908
2005-09-04 23:12:27 +00:00
Nick Mathewson
815c092b22
Make structs for (v2) network-status and its per-router components. Add functions to parse them. Re-do the parsing logic a litt.e. Change signatures in or.h to support new DNS TTL logic.
...
svn:r4898
2005-09-02 20:37:31 +00:00
Roger Dingledine
93179f4e7e
bugfix: moria2 wasn't listing itself as verified in its directory
...
svn:r4893
2005-09-02 06:19:31 +00:00
Roger Dingledine
ba899d0648
when we're shutting down and we do something like try to post a
...
server descriptor or rendezvous descriptor, don't complain that we
seem to be unreachable. of course we are, we're shutting down.
svn:r4892
2005-09-01 08:19:49 +00:00
Roger Dingledine
1b04f38145
subtle change to avoid some false positives:
...
if a server went down for six hours and then came back, we would
complain to it that it's unreachable. now we wait until the third
consecutive descriptor post that we thought it was unreachable,
before complaining to it.
svn:r4891
2005-09-01 08:13:40 +00:00
Roger Dingledine
3b6ab71929
and notify the dirserver operator whenever we do
...
svn:r4890
2005-08-31 06:18:19 +00:00
Roger Dingledine
711cad94ed
when we think a router is unreachable, pass the message back to the
...
server's logs, and make it a 'warn'.
also, fix a memory leak for rejected router descriptors.
svn:r4889
2005-08-31 06:14:37 +00:00
Nick Mathewson
cd2bb915ed
Fix a warning, add an assert.
...
svn:r4875
2005-08-26 23:12:13 +00:00
Nick Mathewson
70fe2a6cee
Crashing dirservers on startup is often considered bad form.
...
svn:r4874
2005-08-26 23:04:12 +00:00
Nick Mathewson
ae4a183ed8
Change the return values on dirserv_add_descriptor
...
svn:r4863
2005-08-26 21:46:24 +00:00
Nick Mathewson
e24d540d81
We no longer need dirserv_load_from_directory_string, so dirserv_add_descriptor no longer has to keep track of where each descriptor ends.
...
svn:r4861
2005-08-26 21:28:16 +00:00
Roger Dingledine
715b972300
disarm a trap
...
svn:r4859
2005-08-26 21:12:53 +00:00
Nick Mathewson
47669fa0fd
Fix assert failure on directory startup.
...
svn:r4858
2005-08-26 21:12:34 +00:00
Nick Mathewson
0e649ac60a
Remove descriptor_list and use routerlist instead. Make directories manage routerlist a little better.
...
svn:r4854
2005-08-26 20:59:04 +00:00
Nick Mathewson
7f78be1659
Clean up the "add myself as a trusted dirserver" code.
...
svn:r4849
2005-08-26 19:31:51 +00:00
Nick Mathewson
43488472ec
The circus music begins playing as nickm and arma juggle an ntohl. Hoop-lah!
...
svn:r4848
2005-08-26 19:25:36 +00:00
Nick Mathewson
ee76baae3d
move a wandering ntohl
...
svn:r4847
2005-08-26 19:23:52 +00:00
Roger Dingledine
893acb3acc
Make a new AssumeReachable config option that will publish anyway.
...
Also, let authdirservers start without setting their Address field.
Something is still not working though. Will fix in morning.
svn:r4839
2005-08-26 07:41:19 +00:00
Roger Dingledine
5e76bac1dd
the tor-spec says router->address must be an IP address. so refuse
...
it if it's not.
(this also fixes some potential security problems with people providing
hostnames as their address and then preferentially resolving them and
partitioning users.)
svn:r4790
2005-08-16 02:52:27 +00:00
Roger Dingledine
f57d062d9c
Implement exit enclaves: if we know an IP address for the destination,
...
and there's a running Tor server at that address which allows exit to
the destination, then extend the circuit to that exit first.
Also, if the user asks for a .exit node, cannibalize general circs for it.
svn:r4779
2005-08-15 03:25:40 +00:00
Roger Dingledine
2caa74e6ff
quiet a noisy debug
...
svn:r4762
2005-08-12 00:34:50 +00:00
Nick Mathewson
249b72f53e
Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
...
svn:r4751
2005-08-08 21:58:48 +00:00
Nick Mathewson
01d0788950
Generalize FirewallPorts to FirewallIPs so I can run happily when locked in net 18.
...
svn:r4737
2005-08-07 21:24:00 +00:00
Nick Mathewson
18c11eb3bc
Be consistent about preferring foo* to struct foo*
...
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
2cff73e7a4
Make "Couldnt add router to list" message more descriptive. Make messages consistenly punctuated.
...
svn:r4582
2005-07-15 19:40:38 +00:00
Roger Dingledine
545c2c6c87
the other half of the bugfix: tolerate a trusted dirserver claiming
...
dirport 0 in its descriptor.
svn:r4576
2005-07-15 18:56:59 +00:00
Roger Dingledine
055477f121
fix compile error (and likely a a crash bug in resolves)
...
svn:r4514
2005-07-01 01:59:37 +00:00
Roger Dingledine
6b21c8e74f
make the local and private network masks explicit when we complain
...
svn:r4501
2005-06-29 19:15:23 +00:00
Roger Dingledine
9c67ae34f1
overall cleanup and streamlining and doccing
...
also fix a DoS avenue on dirservers
svn:r4468
2005-06-20 23:04:13 +00:00
Nick Mathewson
232861ba42
Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
...
svn:r4411
2005-06-11 18:52:12 +00:00
Roger Dingledine
fcd0fc3364
flesh out the source file descriptions for doxygen
...
svn:r4404
2005-06-11 05:31:17 +00:00
Nick Mathewson
0831823763
Change end-of-file NLNL convention. It turns out arma I and I agree.
...
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
a6f51001a5
New whitespace normalization rule: no blank line at EOF.
...
svn:r4378
2005-06-09 16:46:51 +00:00
Roger Dingledine
0fa1890e0e
fix the assumption that uninitialized variables are 0
...
clean up router_load_single_router() more
svn:r4266
2005-05-18 03:52:07 +00:00
Roger Dingledine
fe78aac027
fix seg faults when router_load_single_router fails
...
svn:r4265
2005-05-18 03:42:46 +00:00
Roger Dingledine
b7d6b8a397
doxygeny goodness from tyranix
...
svn:r4262
2005-05-17 17:01:36 +00:00
Roger Dingledine
07230a698c
if router_resolve fails on the descriptor the controller
...
gives us, we shouldn't leave the routerinfo in the list.
svn:r4205
2005-05-14 05:01:41 +00:00
Nick Mathewson
00f2a09380
Append default exit policy before checking for implicit internal addresses: fix bug 129.
...
svn:r4201
2005-05-14 00:13:17 +00:00
Nick Mathewson
3893b3c7ac
Patch for task 133
...
svn:r4189
2005-05-10 22:33:45 +00:00
Roger Dingledine
cee7c5988c
fix massive memory leak
...
(50 megabytes over a couple of days, on the dirservers)
svn:r4181
2005-05-06 08:53:23 +00:00
Nick Mathewson
69dc4e1675
Remove support for looking at old directory/routerdesc elements; mark non-new elements optional; switch to new format for dir-signing-key; start accepting newer elements so we can mark them as non-opt later; make tor-spec say the right stuff.
...
svn:r4154
2005-05-02 21:22:31 +00:00
Roger Dingledine
769541ff7e
be willing to load balance over up to 2mB, not 1mB, of advertised capacity
...
svn:r4080
2005-04-12 22:09:47 +00:00
Roger Dingledine
716d9bc99a
when using preferred entry or exit nodes, ignore whether
...
the circuit wants uptime or capacity. they asked for the
nodes, they get the nodes.
svn:r4025
2005-04-06 06:17:35 +00:00
Nick Mathewson
1aedf3daf5
Only warn once per nickname from add_nickname_list_to_smartlist per failure.
...
svn:r3997
2005-04-03 05:53:34 +00:00
Nick Mathewson
4a90d37229
Better messages when POSTDESCRIPTOR fails
...
svn:r3989
2005-04-02 22:02:13 +00:00
Nick Mathewson
0e81265359
update copyright notices.
...
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
e786e5dedb
when building testing circuits, always use middle hops
...
running at least 0.0.9.7
svn:r3966
2005-04-01 08:42:26 +00:00
Roger Dingledine
35953edae0
Implement controller's "extendcircuit" directive.
...
Also refactor circuit building so we plan the whole path ahead
of time.
svn:r3797
2005-03-22 00:42:38 +00:00
Nick Mathewson
b88c4ba11c
Turn addr_policy_compare from a tristate to a quadstate; this should help address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem.
...
svn:r3786
2005-03-19 06:57:16 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
f90ccf5648
Implement new controller events for changed descriptors and new (not-yet-attached) streams.
...
svn:r3731
2005-03-02 22:29:58 +00:00
Nick Mathewson
c5091e7134
When copying routerinfo, copy descriptor too to prevent later double-free.
...
svn:r3711
2005-02-28 03:37:27 +00:00
Roger Dingledine
a1f1fa6ab2
Checkpoint in-progress fixes:
...
Add 'testing' circuit purpose, for reachability testing.
Notice when our IP changes, and reset stats.
Try to pull down a directory via Tor to see if our DirPort is working.
Try to extend a circuit back to us to see if our ORPort is working.
Only publish a descriptor if they're both reachable.
These mostly work, and I'd better get them in before I cause conflicts.
svn:r3703
2005-02-27 09:47:01 +00:00
Nick Mathewson
8efb2a957d
Make sure that router_get_by_* can always return "me"
...
svn:r3702
2005-02-27 07:23:42 +00:00
Nick Mathewson
bbaa3c7792
Implement more control spec functionality
...
- Mapaddress
- Postdescriptor
- GetInfo on descriptors
Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
can learn about new routers and remember whether we were last told that
they were up or down. Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t. This makes
descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.
svn:r3696
2005-02-25 20:46:13 +00:00
Roger Dingledine
6329811a88
fix a seg fault from tor_free_all
...
svn:r3690
2005-02-24 23:01:26 +00:00
Nick Mathewson
60f234f42b
Add more functions to free things to help dmalloc allong.
...
svn:r3613
2005-02-10 23:18:39 +00:00
Roger Dingledine
236aa86ae7
stop picking unverified dir mirrors, ever.
...
it only leads to misery.
svn:r3610
2005-02-10 07:00:23 +00:00
Roger Dingledine
1447145470
give a bit more load to servers that claim to be able to
...
handle a whole lot.
svn:r3489
2005-02-01 02:56:31 +00:00
Roger Dingledine
d273891107
if we fetch the dir from a mirror that has a wildly skewed
...
clock, then don't bother checking recommended-versions: it will
just make us sad.
as a side effect, people running obsolete versions and whose
clocks are wildly skewed will not be auto-shut-down. but they
will still get warns about their clock skew.
svn:r3459
2005-01-29 11:48:37 +00:00
Nick Mathewson
8115ca5f99
Log the offending policy, not the first policy
...
svn:r3394
2005-01-20 20:42:45 +00:00
Nick Mathewson
129e754ae4
Warn when exit policy implicitly allows local addresses.
...
svn:r3383
2005-01-20 18:39:48 +00:00
Roger Dingledine
0aff4ff4cb
get rid of 0.0.8 backwards compatibility
...
svn:r3353
2005-01-13 20:22:38 +00:00
Roger Dingledine
84c81e0783
Annotate circuits w/ whether they aim to contain high uptime nodes and/or
...
high capacity nodes. When building circuits, choose appropriate nodes.
New config option LongLivedPorts to indicate application streams
that will want high uptime circuits.
When attaching a stream to a circuit, pay attention to its requirements.
This means that every single node in an intro rend circuit, not just
the last one, will have a minimum uptime.
Boost the min uptime from an hour to 24 hours.
svn:r3339
2005-01-12 04:58:23 +00:00
Nick Mathewson
91bafc476e
Fix a fun bug: do not rewrite a cached directory back to the cache; otherwise we will think it is recent and not fetch a newer one.
...
svn:r3319
2005-01-06 20:11:52 +00:00
Nick Mathewson
0c4186d6ee
Use correct logic to decide whether there are more directory servers to retry.
...
svn:r3257
2005-01-03 20:51:24 +00:00
Nick Mathewson
fca7ba9777
Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
...
svn:r3244
2005-01-03 17:53:20 +00:00
Roger Dingledine
95f3e6161b
require BandwidthRate to be at least 10kB/s
...
svn:r3232
2004-12-31 21:47:54 +00:00
Roger Dingledine
5d961c2c06
plug another memory leak
...
svn:r3104
2004-12-07 08:51:10 +00:00
Roger Dingledine
ef6c9d18e7
New circuit building strategy: keep a list of ports that we've used in the past 6 hours, and always try to have 2 circuits open or on the way
...
that will handle each such port. (We can extend this to include addresses
if exit policies shift to require that.) Seed us with port 80 so web
browsers won't complain that Tor is "slow to start up".
This was necessary because our old circuit building strategy just involved
counting circuits, and as time went by we would build up a big pile of
circuits that had peculiar exit policies (e.g. only exit to 9001-9100)
which would take up space in the circuit pile but never get used.
Fix router_compare_addr_to_addr_policy: it was not treating a port of *
as always matching, so we were picking reject *:* nodes as exit nodes too.
If you haven't used a clean circuit in an hour, throw it away, just to
be on the safe side.
This means after 6 hours a totally unused Tor client will have no
circuits open.
svn:r3078
2004-12-05 07:10:08 +00:00
Roger Dingledine
02b3229a04
plus add a comment re: the previous bug
...
svn:r3076
2004-12-04 10:18:41 +00:00
Roger Dingledine
52676364b9
bugfix: router_exit_policy_rejects_all() was broken, so we were
...
sometimes picking middleman nodes as our last hop, which wasn't
very useful.
svn:r3075
2004-12-04 08:56:59 +00:00