Commit Graph

432 Commits

Author SHA1 Message Date
Roger Dingledine
92ef9e37e7 Add a new config option ExitPolicyRejectPrivate which defaults to 1.
This means all exit policies will begin with rejecting private addresses,
unless the server operator explicitly turns it off.

Also, make our code to remove redundancies in the exit policy smarter,
so it can detect "reject foo, reject bar, reject *" patterns.

Lastly, we can get rid of the "exit policy implicitly accepts" code,
since we make everything more explicit now.


svn:r5888
2006-02-01 03:53:52 +00:00
Peter Palfrader
bf514e5dc5 Try to fix policy_includes_addr_mask_implicitly()
svn:r5886
2006-02-01 02:52:55 +00:00
Peter Palfrader
61ea27620a Also catch 0/8 in exit_policy_implicitly_allows_local_networks()
svn:r5885
2006-02-01 02:31:27 +00:00
Roger Dingledine
2eabf190e9 make it louder when we're running an unrecommended version.
also, we need to tell them what versions *are* recommended.
i'll add that to the todo.


svn:r5859
2006-01-24 03:45:58 +00:00
Nick Mathewson
9f42c9d650 Make dirservers generate a separate "guard" flag to mean, "would make a good entry guard". Make clients parse it and vote on it.
svn:r5856
2006-01-24 00:31:16 +00:00
Roger Dingledine
b9540285af remove unused code
svn:r5847
2006-01-20 20:54:42 +00:00
Roger Dingledine
d5acef191c add another assert to make sure we're not scribbling on the stack.
svn:r5837
2006-01-17 04:14:04 +00:00
Nick Mathewson
1057516a07 Clients should not download descriptors for non-running descriptors.
svn:r5830
2006-01-16 20:52:30 +00:00
Nick Mathewson
2dd566d5d5 Indirect access to the signed_descriptor field to make it easier to keep them lazily on disk.
svn:r5827
2006-01-12 18:04:17 +00:00
Roger Dingledine
0e51d5d274 When the controller was submitting a descriptor, we were checking to make
sure some network-status we had referred to it, and refusing it if not.
This is bad for people who want to insert descriptors that aren't part of
the current Tor network. Now we accept them, and also give a more useful
warn message if we ask a dir mirror for a given descriptor and it gives us
one we weren't expecting.


svn:r5824
2006-01-12 03:43:39 +00:00
Nick Mathewson
eb78295e4e Fix memory leak in routerlist_remove_old_routers().
svn:r5790
2006-01-11 03:58:07 +00:00
Roger Dingledine
7d1f675c85 entry nodes are now entry guards.
this is our last easy chance for a wholesale change. heave ho.


svn:r5782
2006-01-10 22:42:44 +00:00
Nick Mathewson
43a4f8c7f3 Be more aggressive about throwing away expired router descriptors: they are of no use to anybody. Better still: dont serve expired descriptors by fingerprint. The only people who ask for them are busted 0.1.1.10 Tors that will throw them away and re-request them after 30 minutes.
svn:r5762
2006-01-10 04:57:12 +00:00
Nick Mathewson
56c55c343e When picking a random directory, prefer non-authorities if any are known.
svn:r5761
2006-01-09 23:39:07 +00:00
Nick Mathewson
e30516f33f Fix bug 236: caches should cache up to 16 unrecognized network-status docs.
svn:r5754
2006-01-08 21:26:33 +00:00
Nick Mathewson
50b6b3258d Dont call directory_get_from_dirserver when you have a particular dirserver in mind; remove fetch-from-authority special-case in directory_get_from_dirserver.
svn:r5741
2006-01-06 18:19:17 +00:00
Roger Dingledine
6aaa92f736 short-circuit half the cost of node-picking in the general case.
svn:r5732
2006-01-05 10:59:46 +00:00
Roger Dingledine
f8a59965a1 cleanups, and remove some unreachable code.
svn:r5727
2006-01-04 06:43:03 +00:00
Roger Dingledine
485aa9415d authdirs now stop whining so loudly about bad descriptors that they fetch
from other dirservers. now when there's a log complaint, it's for sure
from a freshly uploaded descriptor.


svn:r5726
2006-01-04 04:42:10 +00:00
Roger Dingledine
f6f65c66b5 oh, it was supposed to compile?
svn:r5721
2006-01-03 13:12:17 +00:00
Roger Dingledine
da06f3553c don't try to build circuits until we have 3 running servers;
and for networks that are very small, having more than a quarter
of the descriptors is much harder than having equal to or more than
a quarter of the descriptors -- follow the spec.


svn:r5720
2006-01-03 13:09:49 +00:00
Roger Dingledine
9af33ef39c when we choose not to use a server descriptor from our cache, don't
log it so loudly.


svn:r5713
2006-01-03 10:42:20 +00:00
Roger Dingledine
5947388968 Finish implementing config's EntryNodes and StrictEntryNodes option.
The logging is way verbose for now.


svn:r5683
2005-12-31 06:32:57 +00:00
Roger Dingledine
0dc8e284f8 load balance a bit better by taking some load off the really
fast servers.
this might slow things down more, or it might not. hm.


svn:r5681
2005-12-30 04:46:43 +00:00
Roger Dingledine
c051e82f69 fix a typo
svn:r5680
2005-12-30 04:44:10 +00:00
Nick Mathewson
fc850273bd Appease some verbose GCC warnings.
svn:r5679
2005-12-29 20:25:53 +00:00
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Nick Mathewson
9ef54a3d0c Make directory caches a little less chatty when logging
svn:r5662
2005-12-27 06:05:54 +00:00
Nick Mathewson
fa0d5aa894 Make insert_old try hard to never add a duplicate.
svn:r5661
2005-12-27 05:58:12 +00:00
Nick Mathewson
ece9865020 Implement new directory logic: download by descriptor digest, not by key digest. Caches try to download all listed digests from authorities; clients try to download "best" digests from caches.
svn:r5659
2005-12-27 05:26:03 +00:00
Roger Dingledine
34249e8861 fix segfault when specifying DirServer without nickname
(reported by weasel)


svn:r5614
2005-12-18 22:45:27 +00:00
Nick Mathewson
6b5fc9d46f Instead of "Network down", say "Is your network connection down?"
svn:r5607
2005-12-15 22:10:03 +00:00
Roger Dingledine
edde3fcf25 ah ha, that variable was static. not useless after all.
svn:r5604
2005-12-15 21:44:23 +00:00
Roger Dingledine
002c9b3589 clean up a lot message, and remove a line that does nothing.
svn:r5603
2005-12-15 21:41:27 +00:00
Nick Mathewson
cf8c70b79c fix compile
svn:r5600
2005-12-15 21:38:59 +00:00
Nick Mathewson
280c62314e Make clients look at the fast and stable flags in networkstatus, not at the bandwidth and uptime declared in the router descriptors.
svn:r5599
2005-12-15 21:30:57 +00:00
Roger Dingledine
3489066433 put back in a todo comment, so we don't forget.
svn:r5598
2005-12-15 21:26:52 +00:00
Nick Mathewson
24e79df0b6 Whitespace fixes; comments.
svn:r5596
2005-12-15 21:17:40 +00:00
Nick Mathewson
6b1305aeeb Flip a misplaced not
svn:r5593
2005-12-15 20:56:46 +00:00
Nick Mathewson
ce71b17224 Clean fake_status a bit. Switch from has_fetched_directory to have_minimum_dir_info, and make the latter function smarter.
svn:r5591
2005-12-15 20:44:15 +00:00
Roger Dingledine
25e1ad02fa implement weasel's suggestion to fix the bug that newly bootstrapped
tor networks couldn't do hidden services until they had nodes with high
uptime: if you're trying to pick a node for your circuit and you demand
uptime or capacity and nothing works, then abandon your need for uptime
and capacity.


svn:r5589
2005-12-15 09:53:00 +00:00
Nick Mathewson
7af95e5c06 When we mark a router as down, also mark its local_routerstatus as not running. This way, we do not use directories that are believed to be down.
svn:r5587
2005-12-14 22:05:10 +00:00
Nick Mathewson
9482b1b9d5 Choose directory servers from routerstatus list, not from routerinfo list. This way, as soon was we have a networkstatus, we can ask a cache to give us routers, rather than needing to ask the directories.
svn:r5586
2005-12-14 22:00:58 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Nick Mathewson
32126cced1 Make directory authorities ignore router uploads that have only cosmetic differences: now regardless of version!
svn:r5573
2005-12-12 01:02:08 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Roger Dingledine
9b0a40ec78 crank the max line limit down to 150 chars.
svn:r5550
2005-12-10 08:27:01 +00:00
Nick Mathewson
39265dd72e In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
2005-12-09 05:37:26 +00:00
Nick Mathewson
b1d034d2ab Fix bug 212: Directory authorities should not try to download server descriptors that they know they will reject.
svn:r5514
2005-12-06 06:55:43 +00:00
Nick Mathewson
9cec3a13f5 remove some functions that are not used; #if0 out some files that are not likely to be used.
svn:r5471
2005-11-30 06:27:59 +00:00