Nick Mathewson
4a7ee9bd3d
Make unittests pass again.
...
svn:r5773
2006-01-10 20:47:24 +00:00
Roger Dingledine
b2d79f278b
or_state_validate() needs an extra arg too or it will crash
...
svn:r5772
2006-01-10 20:38:33 +00:00
Roger Dingledine
f4299f0f44
hack to address bug 238.
...
needs a better fix, but not for 0.1.1.11.
svn:r5771
2006-01-10 20:27:47 +00:00
Roger Dingledine
d114ea7125
implement getinfo desc/all-recent
...
closes bug 237.
svn:r5770
2006-01-10 20:09:31 +00:00
Roger Dingledine
f71273c216
fix bug 235
...
svn:r5768
2006-01-10 20:06:24 +00:00
Nick Mathewson
7fc62029d4
Refuse to use RunAsDaemon when torrc is a relative path. Fixes bug 229.
...
svn:r5767
2006-01-10 20:00:20 +00:00
Nick Mathewson
e1d1ce3da8
Warn about actual offending hiddenservice* config option, now that more than one is possible. Closes bug 239.
...
svn:r5766
2006-01-10 19:28:31 +00:00
Nick Mathewson
2fda7140e8
Fix bug 221 and bug 201: For 221, check return value from connection_add() when adding a rendezvous post connection. For 201, do not include a content-length 0 with a GET request.
...
svn:r5765
2006-01-10 19:24:40 +00:00
Roger Dingledine
c8e6003412
balance the reachability testing so a smidgen of it happens
...
every 10 seconds. this way we don't try to do 500 tls's at
once every 20 minutes.
svn:r5763
2006-01-10 07:21:01 +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
bec9b705cc
Instrument directory client bytes as well as server bytes.
...
svn:r5760
2006-01-09 23:13:53 +00:00
Nick Mathewson
10100c4315
Make instrmentation code a little cleaner.
...
svn:r5759
2006-01-08 22:19:41 +00:00
Roger Dingledine
fa05c1b21b
remove the loud logging of busted rendezvous descriptors
...
svn:r5758
2006-01-08 22:16:30 +00:00
Roger Dingledine
6dcbbda43b
remove typo
...
svn:r5757
2006-01-08 22:16:09 +00:00
Nick Mathewson
ff9cfa9644
Instrument how many directory bytes we are serving in what kind of request.
...
svn:r5756
2006-01-08 22:09:54 +00:00
Nick Mathewson
5d709e8517
Fix bug in last commit. Also, fix bug 231: authorities should never treat their own descriptor changes as cosmetic.
...
svn:r5755
2006-01-08 21:33:15 +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
Roger Dingledine
1dd8ebf615
bugfix: we were leaving open duplicate connections to other ORs
...
for a week, rather than closing them once we detect a duplicate.
also, avoid some duplicate mark-for-closes in connection-housekeeping.
svn:r5752
2006-01-07 03:56:56 +00:00
Roger Dingledine
9796733e89
"Pending" is a bad term for a circuit that uses your server as its last hop.
...
svn:r5751
2006-01-07 02:31:14 +00:00
Roger Dingledine
d4d7a49411
fix typo
...
svn:r5750
2006-01-07 02:12:38 +00:00
Roger Dingledine
af54b73985
and get the log arguments right
...
svn:r5747
2006-01-07 01:43:09 +00:00
Roger Dingledine
ba339b8a4d
a more correct log message
...
svn:r5746
2006-01-07 01:41:17 +00:00
Roger Dingledine
654b61a2e8
Jan 05 19:39:27.356 [warn] connection_edge_process_end_not_open():
...
Got an end because of misc error, but we're not an AP. Closing.
svn:r5744
2006-01-07 01:02:21 +00:00
Roger Dingledine
f88fa3efc1
helper nodes are dead
...
svn:r5743
2006-01-07 00:41:50 +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
Nick Mathewson
f0fb9f6b0c
Directory authorities should go to the proper authority when asking for a networkstatus, even when they want a compressed one. (Also, bullet-proof the logic in case we ever accidentally request a networkstatus for a non-authority.)
...
svn:r5740
2006-01-06 18:05:48 +00:00
Nick Mathewson
65f76bad4f
Add descriptions for state variables; rename AccountingBytesRead{In}Interval; remove extraneous and unused struct member.
...
svn:r5739
2006-01-06 15:43:03 +00:00
Nick Mathewson
447e6ffffd
Fix bug where OPs would try to generate descriptor and crash.
...
svn:r5738
2006-01-06 15:40:34 +00:00
Nick Mathewson
878962bee1
Add reasons to DESTROY and RELAY_TRUNCATED cells.
...
svn:r5734
2006-01-05 21:23:03 +00:00
Roger Dingledine
d8e3bc0288
fix a wrong string
...
svn:r5733
2006-01-05 12:18:34 +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
1107c40dc0
mention a recommended log level in the sample torrc file
...
svn:r5731
2006-01-05 10:37:22 +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
6b2a6a8239
Bugfix: dyndns tor servers were needing to wait 18 hours before they
...
could start doing reachability testing using the new IP address and
ports. This is because we were using the internal descriptor to learn
what to test, yet we were only rebuilding the descriptor once we
decided we were reachable.
svn:r5723
2006-01-03 23:34:42 +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
5d28b7b884
we're done with tree.h. long live ht.h.
...
svn:r5715
2006-01-03 12:35:58 +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
4f033b0028
make the commenting in the torrc.sample consistent, and try to
...
explain in it what comments are.
svn:r5711
2006-01-03 00:45:12 +00:00
Roger Dingledine
16ee6830b6
only print bandwidth lines to the state file if we're being a server.
...
otherwise this is pointless and probably bad for security.
svn:r5704
2006-01-02 12:19:28 +00:00
Roger Dingledine
1d474e14d7
strictentrynodes means we should clear the current entry_nodes list.
...
svn:r5703
2006-01-02 11:33:14 +00:00
Roger Dingledine
c5a5161fb5
prevent auth dir servers from enabling entry nodes.
...
svn:r5702
2006-01-02 08:40:58 +00:00
Roger Dingledine
358052416d
bugfix: only try to use the EntryNodes config option if it is set.
...
svn:r5701
2006-01-02 05:14:21 +00:00
Roger Dingledine
ddf070e204
bugfix: we were failing to parse a tor version that started with
...
"Tor ", even though we said we could.
svn:r5699
2006-01-02 05:11:31 +00:00
Roger Dingledine
ea6ea8ec22
Make UseEntryNodes true by default. Let the fun begin.
...
svn:r5698
2006-01-02 05:00:03 +00:00
Roger Dingledine
aa604ef2c2
bugfix: only try to parse the TorVersion if there is one.
...
svn:r5697
2006-01-02 04:58:12 +00:00
Roger Dingledine
839111b85a
tolerate a mal-formed or unrecognized tor version in the state file.
...
svn:r5696
2006-01-02 04:45:18 +00:00
Roger Dingledine
a45b131590
check for integer overflows in more places, when adding elements to
...
smartlists. this could possibly prevent a buffer overflow on malicious
huge inputs. i don't see any, but i haven't looked carefully.
svn:r5695
2006-01-02 04:40:18 +00:00
Roger Dingledine
0bd25f5d43
save and validate TorVersion in the state file.
...
svn:r5694
2006-01-02 04:14:52 +00:00
Roger Dingledine
2efa056777
make the "stable" flag in network-status be the median of the uptimes
...
of running valid servers. that way the cutoff adapts to the stability
of the network as a whole.
svn:r5693
2006-01-02 03:32:55 +00:00
Nick Mathewson
4868d77ab8
Possible fix to state-load bug reported by weasel.
...
svn:r5692
2006-01-02 00:42:19 +00:00
Nick Mathewson
0da2069643
Clearner fix for timegm assert problem.
...
svn:r5690
2006-01-01 23:13:19 +00:00
Nick Mathewson
04db9de847
Fix assertion-trigger bug found by sjmurdoch
...
svn:r5689
2006-01-01 23:09:19 +00:00
Peter Palfrader
3dc69d3add
Make tor compile again
...
svn:r5688
2005-12-31 11:52:13 +00:00
Roger Dingledine
6c693dbda6
add a TorVersion state string.
...
not yet set to anything.
svn:r5687
2005-12-31 08:16:07 +00:00
Roger Dingledine
e9e7dc176c
Some tor servers process billions of cells in a matter of days.
...
These statistics need to be uint64_t's.
svn:r5686
2005-12-31 08:09:26 +00:00
Roger Dingledine
1a11b97b15
get rid of the special case for 'testing' circuits
...
svn:r5684
2005-12-31 06:37:34 +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
6005e110b9
whitespace fixes
...
svn:r5682
2005-12-31 06:26:10 +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
2904c6f024
log how big the failed rend descriptor is, and if it's small, log
...
a base16 of the whole thing.
svn:r5678
2005-12-29 04:57:19 +00:00
Roger Dingledine
14ea2e0b56
when we reject a rend descriptor, tell us where it came from.
...
svn:r5677
2005-12-29 04:43:24 +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
Roger Dingledine
5d9256a367
but only close the new conn if one of the earlier helper nodes
...
that we mark up is actually reachable, fast enough, etc to use.
svn:r5672
2005-12-28 07:27:41 +00:00
Roger Dingledine
c1145138ea
but only close it if we have marked an earlier helper as up.
...
that way we don't close it too needlessly.
svn:r5671
2005-12-28 07:20:33 +00:00
Roger Dingledine
60cd03069a
when we connect to a helper node for the first time, close
...
that connection and its circuits. this lets us go back to
using the old helper nodes rather than immediately using
the last one in the list.
svn:r5670
2005-12-28 07:19:55 +00:00
Roger Dingledine
bbc4c8cef8
fix a spacing problem introduced by our 80-column requirement
...
svn:r5669
2005-12-27 10:11:29 +00:00
Roger Dingledine
d2171cb7a4
if the network is down, and we try to connect to a conn because we
...
have a circuit in mind, and we timeout (30 seconds) because the
network never answers, we were expiring the circuit, but we weren't
obsoleting the connection or telling the helper functions. now do that.
svn:r5668
2005-12-27 09:25:50 +00:00
Roger Dingledine
4088f7dfd1
fix typo
...
svn:r5667
2005-12-27 09:04:36 +00:00
Roger Dingledine
f46c135fac
when we succeed at connecting to a helper that we've never connected
...
to before, mark all the previous helpers as up. This is handy if the
network went away and then returned.
svn:r5666
2005-12-27 08:54:37 +00:00
Roger Dingledine
25fcb5fa9c
helpful log
...
svn:r5665
2005-12-27 08:38:22 +00:00
Roger Dingledine
976bf06463
slightly more accurate log messages
...
svn:r5664
2005-12-27 07:37:21 +00:00
Roger Dingledine
25052c6f4b
first cut of the new helper stuff. seems to work in the normal
...
case, but many edge cases still need testing.
svn:r5663
2005-12-27 07:23:52 +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
Nick Mathewson
d94b9fd7d2
normalize spaces
...
svn:r5658
2005-12-27 04:52:34 +00:00
Roger Dingledine
94bff33357
and compiling would be good too
...
svn:r5657
2005-12-27 02:48:35 +00:00
Roger Dingledine
370dcbc7ba
and some comments
...
svn:r5656
2005-12-27 02:48:02 +00:00
Roger Dingledine
5807bd0635
make it clearer in the auto-generated config file that you
...
probably shouldn't be editing this one yourself.
svn:r5655
2005-12-27 02:46:53 +00:00
Roger Dingledine
b038dc9ecc
disambiguate some debug entries
...
svn:r5654
2005-12-26 22:42:22 +00:00
Roger Dingledine
815df977cf
comments? i'll show you comments.
...
svn:r5652
2005-12-26 05:52:44 +00:00
Roger Dingledine
40c267a89f
prevent a rare infinite loop on two-byte architectures,
...
and be more thorough and starting over when the clock jumps.
svn:r5647
2005-12-25 04:37:33 +00:00
Roger Dingledine
7e0d62b14a
stop being sneaky, especially if we're being incorrectly sneaky
...
svn:r5646
2005-12-24 23:39:20 +00:00
Roger Dingledine
b0144276db
more comments, and start to use the made_contact entry.
...
svn:r5645
2005-12-24 23:32:35 +00:00
Roger Dingledine
7cc53c2281
clean up some comments
...
svn:r5644
2005-12-24 23:32:15 +00:00
Roger Dingledine
35986a2374
simplify because we weren't using those return values anyway
...
svn:r5643
2005-12-24 22:48:12 +00:00
Roger Dingledine
3a2ce447b4
start to document the helper node functions
...
svn:r5642
2005-12-24 20:07:19 +00:00
Peter Palfrader
4bd65f0f98
Keep bandwidth history accross restarts/crashes
...
svn:r5637
2005-12-23 23:56:42 +00:00
Roger Dingledine
eecb835527
stop shipping tree.h, since we don't use anymore. (woo.)
...
svn:r5628
2005-12-20 07:17:42 +00:00
Roger Dingledine
bb4662365b
when we fail three times to resolve or connect, we were telling the
...
user it was because we failed to resolve.
svn:r5620
2005-12-19 21:56:43 +00:00
Roger Dingledine
da01657c34
more asserts in case weasel can trigger them
...
svn:r5616
2005-12-19 00:35:18 +00:00
Roger Dingledine
7cd46d7f95
fix a seg fault when you finish connecting to a server but
...
at that moment you dump his server descriptor, and you also
happen to be logging at loglevel info.
(found by weasel)
svn:r5615
2005-12-18 22:59:47 +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
Roger Dingledine
a2186b9999
fix a ! that got left out
...
svn:r5612
2005-12-18 22:34:24 +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
a6afef700a
nother typo
...
svn:r5605
2005-12-15 21:51:12 +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
89eded7b17
Add "panic" option to reject all servers not in fingerprint list.
...
svn:r5601
2005-12-15 21:39:38 +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
Roger Dingledine
dadcb19d17
fix typo
...
svn:r5597
2005-12-15 21:26:39 +00:00
Nick Mathewson
24e79df0b6
Whitespace fixes; comments.
...
svn:r5596
2005-12-15 21:17:40 +00:00
Nick Mathewson
713c995adb
Do not mark directories as down simply because they dont have the router descs we want.
...
svn:r5595
2005-12-15 21:15:16 +00:00
Nick Mathewson
5965b3849e
Remove some redundant and obsolete code from routerparse
...
svn:r5594
2005-12-15 20:58:51 +00:00
Nick Mathewson
6b1305aeeb
Flip a misplaced not
...
svn:r5593
2005-12-15 20:56:46 +00:00
Nick Mathewson
3ea32f51cb
add a few clarifying comments
...
svn:r5592
2005-12-15 20:49:01 +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
7e6a41af93
Make hashtables use a little less space on 64-bit architectures.
...
svn:r5585
2005-12-14 21:10:06 +00:00
Nick Mathewson
c02c6b5823
Shave off 8 bytes per connection and 4 bytes per circuit by paying attention to padding warnings, moving fields around, and acknowledging that we have no files with over 64 kilolines.
...
svn:r5583
2005-12-14 21:03:51 +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
7e632a7564
another possible patch related to circuit_free and memory stomping.
...
svn:r5580
2005-12-14 18:55:17 +00:00
Nick Mathewson
4f38670328
Fix a potential memory stomp on servers running hidden services. Found by weasel with valgrind. Backport candidate.
...
svn:r5579
2005-12-14 02:19:27 +00:00
Roger Dingledine
86d69218ef
orconn_identity_map was another static variable that started
...
out NULL and didn't change until it needed to change.
svn:r5578
2005-12-14 01:02:35 +00:00
Roger Dingledine
c9f6e6b0a0
sometimes, when we just started tor, we haven't created that
...
smartlist yet. so don't free it.
svn:r5577
2005-12-14 00:52:15 +00:00
Roger Dingledine
d853c9a009
bugfix: when we removed a dead helper node, we never committed that
...
change to disk.
svn:r5576
2005-12-13 02:52:38 +00:00
Roger Dingledine
ea760fa149
extendcircuit and attachstream would complain about not enough
...
arguments, but then just keep on going anyway.
svn:r5575
2005-12-12 16:50:55 +00:00
Nick Mathewson
27a201ac80
Have dirctory authorites note which servers make good V2 directory caches in publishe network-status.
...
svn:r5574
2005-12-12 01:03:28 +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
bf4da967c1
Don't use helper nodes for circuits with purpose 'testing'.
...
Also, when picking the helper node for a given circuit,
exclude the circuit's exit from your choices.
svn:r5569
2005-12-11 12:14:26 +00:00
Roger Dingledine
a131783c8b
when removing dead helpers, only write or_state to disk once at the
...
end, not for every helper you remove.
svn:r5568
2005-12-11 11:56:17 +00:00
Roger Dingledine
5981169440
mark the helper node as down if we time-out on the circuit handshake
...
with him.
svn:r5567
2005-12-11 11:55:41 +00:00
Roger Dingledine
dded1dd8bd
don't mark the helper node as down when we fail to connect to
...
our https proxy.
svn:r5566
2005-12-11 11:54:55 +00:00
Roger Dingledine
9c01fa3d59
fix yet another time comparison bug. we were abandoning helpers
...
as soon as they became unavailable. (is this true?)
svn:r5565
2005-12-11 11:23:36 +00:00
Roger Dingledine
f3349d6ed3
fix an error in reporting why we abandoned a helper node
...
svn:r5564
2005-12-11 11:20:26 +00:00
Roger Dingledine
b974f67c01
choose helper nodes to have high capacity always
...
svn:r5563
2005-12-11 11:20:01 +00:00
Roger Dingledine
77c0f6d456
a first go at fixing a bug matt edman reported: when he tries
...
to "setconf log" via the controller, it is friendly and gives
him a log to stdout, even though he didn't ask for one.
svn:r5562
2005-12-11 10:01:21 +00:00
Roger Dingledine
79f09b2f17
setconf orport=9001
...
513 Unrecognized option value
it's not unrecognized. it's unacceptable. (in this case, i still
have to consult the logs to figure out why, but at least i have
an inkling that maybe i should.)
svn:r5561
2005-12-11 09:33:38 +00:00
Roger Dingledine
46d563fe00
whenever we hupped or did a controller setconf, we were prepending
...
another reachableaddresses *:80,*:443 if fascistfirewall was set,
and we were appending another reject *:* regardless.
svn:r5560
2005-12-11 09:18:25 +00:00
Roger Dingledine
a4e1014f4d
i think fascistfirewall still has its uses. it's a synonym
...
for a certain reachableaddresses line, but it's easier to
remember and people already understand it. i think we should
think about undeprecating it.
svn:r5559
2005-12-11 08:59:02 +00:00
Roger Dingledine
c21666ca59
bump to 0.1.1.10-alpha-cvs
...
svn:r5558
2005-12-11 07:33:16 +00:00
Roger Dingledine
eaa864ed17
bump to 0.1.1.10-alpha
...
svn:r5553
2005-12-10 21:15:18 +00:00
Roger Dingledine
defa3804cf
explain why 0.1.1.9-alpha-cvs is a special version.
...
svn:r5552
2005-12-10 21:07:21 +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
95e471c9a6
Normalize whitespace
...
svn:r5547
2005-12-09 05:22:15 +00:00
Nick Mathewson
33c4445846
For some bizarre reason, MSVC does not implement GCC extensions. Who would have thought?
...
svn:r5546
2005-12-09 05:20:02 +00:00
Nick Mathewson
a1bcdb2f76
util.c:1308: error: conflicting types for "is_internal_IP"
...
svn:r5545
2005-12-09 05:15:36 +00:00
Roger Dingledine
a438f2abcd
let the user configure a sockslistenaddress on other private IPs
...
besides 127.x.y.z without complaining.
and give a better message in the log.
svn:r5544
2005-12-09 02:46:46 +00:00
Roger Dingledine
c0a6e2232c
let is_internal_IP() know whether you're asking about an IP
...
address for connecting or an IP address for binding, because
in the latter, 0.0.0.0 is a special case.
svn:r5543
2005-12-09 02:45:33 +00:00
Nick Mathewson
d57029ffe8
Make code to handle "private" alias work when assume_action is set.
...
svn:r5542
2005-12-08 23:58:23 +00:00
Roger Dingledine
8730190914
when we're checking reachability, make it clearer in the logs
...
what to expect.
svn:r5538
2005-12-08 21:12:47 +00:00
Roger Dingledine
d3dcea08af
remove a redundant memcpy when extending to a new server
...
and attaching circuits to it.
svn:r5537
2005-12-08 20:33:57 +00:00
Nick Mathewson
338f23114f
Oops. 0.0.0.0/8 and 169.254.0.0/16 are also special.
...
svn:r5536
2005-12-08 19:58:14 +00:00
Nick Mathewson
2d585941b8
Release memory from conn_circid_circuit_map on exit.
...
svn:r5535
2005-12-08 19:46:22 +00:00
Nick Mathewson
1b770817c0
Add private:* as an alias in configuration for policies.
...
svn:r5534
2005-12-08 19:40:24 +00:00
Nick Mathewson
898968b3ac
Warn when binding to a public address for socks. This warning needs to be improved. Also, make options_validate() only warn when an option is changed to a bad value.. (Previously, it warned when an option was bad and any option was changed.)
...
svn:r5532
2005-12-08 18:56:32 +00:00
Nick Mathewson
e9b66ec906
Document CREATE_FAST better in the code. Move our key expansion algorithm into a separate function in crypto.c
...
svn:r5530
2005-12-08 17:38:32 +00:00
Nick Mathewson
617f71e4ba
Whitespace normalization
...
svn:r5528
2005-12-08 04:03:12 +00:00
Nick Mathewson
cf5facf3e1
Do not free a constant string.
...
svn:r5527
2005-12-08 04:01:37 +00:00
Nick Mathewson
f031ee8246
Make clients use CREATE_FAST cells. add an option to disable this.
...
svn:r5524
2005-12-07 22:09:02 +00:00
Roger Dingledine
130d0e4d1d
fix typo noticed by scrimbly
...
svn:r5522
2005-12-07 19:49:18 +00:00
Roger Dingledine
4902ece698
what the heck is wrong with this little piece of code?
...
why can none of us get it right?
it looks so simple.
svn:r5521
2005-12-07 04:43:39 +00:00
Roger Dingledine
b0ffa34219
tell the controller about new .onion streams too.
...
svn:r5520
2005-12-06 23:43:52 +00:00
Roger Dingledine
485b2cb4dc
get rid of nick's crazy voodoo dh checking.
...
svn:r5518
2005-12-06 23:09:44 +00:00
Roger Dingledine
5c0338dca3
the other half of weasel's patch, so old gcc's can build cvs again.
...
svn:r5517
2005-12-06 21:03:48 +00:00
Peter Palfrader
0dbb622f26
Old gccs want you to do your variable declarations first
...
svn:r5516
2005-12-06 17:01:36 +00:00
Roger Dingledine
3347762fa4
when we're giving up on a circuit and retrying on a new one,
...
log the name of the exit node. perhaps people will find this
useful, or see patterns, or something.
svn:r5515
2005-12-06 07:21:17 +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
d2123388ad
Better fix for last bug: avoids trying to double-mark circuits.
...
svn:r5511
2005-12-05 19:45:54 +00:00
Nick Mathewson
fedc9c8a60
We were neglecting to unlink marked circuits from soon-to-close OR connections.
...
svn:r5510
2005-12-05 19:26:09 +00:00
Nick Mathewson
b03e8733f3
Change how OR conns get removed from the identity map; fix some warnings on shutdown.
...
svn:r5509
2005-12-05 19:15:27 +00:00
Nick Mathewson
f0abb1a74b
Check magic when removing old connection from map.
...
svn:r5508
2005-12-05 19:01:34 +00:00
Nick Mathewson
835f06a77c
Set chosen_exit_name to something we are not about to zero.
...
svn:r5507
2005-12-05 06:16:24 +00:00
Nick Mathewson
98290e4115
When parsing foo.exit, if foo is unknown, and we are leaving circuits unattached, set the chosen_exit field and leave the address empty
...
svn:r5504
2005-12-05 04:38:21 +00:00
Peter Palfrader
1bf56b452e
Remove superfluous strdup
...
svn:r5503
2005-12-05 01:30:11 +00:00
Peter Palfrader
7a70a142f4
Also print usernames, not just numeric UIDs when we tell the user that his data directory has the wrong owner
...
svn:r5502
2005-12-05 01:28:10 +00:00
Roger Dingledine
8b0f1f029c
give a hint when people are running tor as the wrong user, rather than
...
telling them to start chowning random directories.
svn:r5500
2005-12-05 01:07:58 +00:00
Roger Dingledine
26b49dbc09
Bugfix for trackhostexits: write down the fingerprint of the chosen exit,
...
not its nickname, because the chosen exit might not be verified.
svn:r5499
2005-12-05 00:15:42 +00:00
Roger Dingledine
40cbe550f3
fix a log message to be mildly more helpful
...
svn:r5498
2005-12-04 23:06:48 +00:00
Roger Dingledine
bb8dc691eb
Fix another time comparison bug in circuit_stream_is_being_handled().
...
Nick, can you confirm this one?
This is also a backport candidate.
svn:r5497
2005-12-04 22:23:24 +00:00
Roger Dingledine
ef000fd82e
ok, i know this one was a bug. we were expiring open general
...
circuits after they had been around for 30 seconds.
svn:r5496
2005-12-04 22:19:04 +00:00
Roger Dingledine
7d032bd300
take back half of my bugfix. comparing times sucks.
...
but leave the other half.
svn:r5495
2005-12-04 21:59:15 +00:00
Roger Dingledine
d60f514f4c
fix the first bug with our optimization to circuit_expire_building():
...
we were killing off rendezvous circuits unless they magically time-warped
to be too old before we got around to killing them, in which case we
would leave them alone. this made it hard to rendezvous with hidden
services.
svn:r5494
2005-12-04 21:51:50 +00:00
Nick Mathewson
1b0134dda8
Clean up some comments; remove some dead code
...
svn:r5493
2005-12-03 16:32:29 +00:00
Nick Mathewson
61c5a9ae2b
Use a switch statement and some mild refactoring to try to speed up circuit_expire_building
...
svn:r5492
2005-12-03 05:29:05 +00:00
Nick Mathewson
979fc3e69d
cvs diff -u src/or/circuitlist.c | less almost never does what you want in C.
...
svn:r5491
2005-12-03 03:36:32 +00:00
Nick Mathewson
77a494dd55
Expunge remaining places where we used "tree" to mean "associative array".
...
svn:r5490
2005-12-03 02:21:31 +00:00
Nick Mathewson
148a1e969d
Shave off another 4.7%: remove a linear search when figuring out which circuits wanted us to open a given OR connection.
...
svn:r5489
2005-12-03 02:12:37 +00:00
Nick Mathewson
502cb59611
Remove "tree" references from dns.
...
svn:r5488
2005-12-03 02:01:18 +00:00
Nick Mathewson
ce3cdecb9d
Make more arguments const; do not call hash tables trees.
...
svn:r5487
2005-12-03 02:00:51 +00:00
Nick Mathewson
4a0b6af935
Ive spent about 10 hours benchmarking permutations on our counter-mode implementation. This is the one that flies. (Avoid OpenSSL; optimizze rijndael calling convention to avoid needing to marshall and unmarshall counter.) This should speed up cell encryption by about 27%.
...
svn:r5486
2005-12-01 18:30:39 +00:00
Nick Mathewson
6443e5ec7f
Add a benchmark-aes function to test.c. Off by default.
...
svn:r5485
2005-12-01 04:35:58 +00:00
Nick Mathewson
fea19528a1
assert_buf_ok was showing up in the profile; remove it from critical-path functions, since it hasnt triggered for ages.
...
svn:r5479
2005-11-30 22:48:58 +00:00
Roger Dingledine
a6da372000
and its header
...
svn:r5478
2005-11-30 22:23:27 +00:00
Roger Dingledine
923ad87470
remove another unused function
...
svn:r5477
2005-11-30 22:19:02 +00:00
Roger Dingledine
77a425d8b2
Remove some functions that were around for hupping log files. We handle
...
them already in do_hup() by marking our log files as temporary and then
rotating them in options_init_from_torrc().
svn:r5473
2005-11-30 06:45:30 +00:00
Nick Mathewson
d56a65c497
Fix some verbose warnings and remove an unneeded include.
...
svn:r5472
2005-11-30 06:38:41 +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
Nick Mathewson
a6eb8cd2a0
Move connection_or_remove_from_identity_map() to connection_unlink, but dont remove the other; just make it warn.
...
svn:r5470
2005-11-30 04:28:41 +00:00
Nick Mathewson
3bd613b44d
Rename connection_get_by_identity_digest to reflect that it is OR-only. Make it use a hashtable instead of a linear search.
...
svn:r5469
2005-11-30 03:01:16 +00:00
Nick Mathewson
6b49a93bd5
Move code to check for zero digests into util.c
...
svn:r5468
2005-11-30 02:47:59 +00:00
Nick Mathewson
447a3a7ff2
Funny. I could have sworn that it compiled.
...
svn:r5467
2005-11-29 17:17:02 +00:00
Nick Mathewson
94e8dcef44
Fix a bug weasel found: when we are an authority and somebody requests "all" statuses, cconsider regenerating our own.
...
svn:r5466
2005-11-29 17:14:10 +00:00
Nick Mathewson
c90d6c7e5f
Make arguments to circuit_set_circid_orconn match the connection that is closing in circuit_about_to_close_connection. This accounts for our mysterious "arbitrary ram gets decremented!" bug.
...
svn:r5465
2005-11-29 17:13:34 +00:00
Nick Mathewson
7de0c33857
Avoid a segfault in routerlist_reset_warnings()
...
svn:r5464
2005-11-28 16:29:27 +00:00
Roger Dingledine
1da454a42d
when returning a list of circuits, don't return a list of the same
...
conn over and over. that's really bad for memory.
svn:r5463
2005-11-28 02:52:17 +00:00
Roger Dingledine
f94f4c1686
when event_add or event_del fail, tell us why.
...
(nick, do i have my libevent strerror dance moves correct?)
svn:r5462
2005-11-26 09:37:00 +00:00
Roger Dingledine
97f748f680
clean up broken comment
...
svn:r5461
2005-11-26 09:27:36 +00:00
Nick Mathewson
652e1899ac
"How about 'never'? Does 'never' work for you?"
...
Weasel says circuit_get_by_conn is his main timesink. Most of its
users were just checking whether OR conns had circuits, so add a
circuit count to OR conns, and check that. One was
circuit_about_to_close_conn, which was doing an O(n^2) series of calls
to get all circs on an OR conn, so make an O(n) function for that.
Finally, circuit_get_by_edge_conn was using it as a sanity test that
has been around for a while but never found any actualy insanity, so
kill that.
circuit_get_by_conn is finally dead, which is good, since it was never
sane to begin with.
svn:r5460
2005-11-26 01:43:57 +00:00
Nick Mathewson
31d5d96739
Cut down a common call to circuit_get_by_conn by about half.
...
svn:r5459
2005-11-26 00:53:51 +00:00
Nick Mathewson
72cb64406a
HT_NEXT invalidates the last iterator; fix rmv-related segfault.
...
svn:r5458
2005-11-26 00:42:25 +00:00
Roger Dingledine
fe221f3dff
Start the process of treating internal circuits and exit circuits
...
separately. It's important to keep them separate because internal
circuits have their last hops picked like middle hops, rather than like
exit hops. So exiting on them will break the user's expectations.
- Stop cannibalizing internal circuits for general exits, and stop
cannibalizing exit circuits for rendezvous stuff.
- Don't let new exit streams attach to internal circuits.
- When deciding if we have enough circuits for internal and for exit,
don't count the wrong ones.
- Treat predicted resolves as predicted port 80 exits.
svn:r5457
2005-11-25 08:08:56 +00:00
Roger Dingledine
6452aecedb
when calling connection_get_by_identity_digest, don't do a memcmp
...
for non-OR conns. this should save a bit of time.
svn:r5456
2005-11-25 06:43:53 +00:00
Roger Dingledine
b6b1b4f283
Bandaid workaround to make cvs not crash tor clients.
...
This is not a real fix. I didn't look at the rest of the code.
Nick?
svn:r5455
2005-11-25 02:16:10 +00:00
Roger Dingledine
2350e487a2
minor cleanup
...
svn:r5454
2005-11-24 06:44:13 +00:00
Roger Dingledine
ea7fe0c267
Fix a bug found by Lasse Overlier: when we were making internal circuits
...
(intended to be cannibalized later for rendezvous and introduction
circuits), we were picking them so that they had useful exit nodes. There
was no need for this, and it actually aids some statistical attacks.
svn:r5453
2005-11-24 06:43:39 +00:00
Roger Dingledine
5b583073a1
remove some more dead code (found while hunting lasse's bug)
...
svn:r5452
2005-11-24 06:06:50 +00:00
Roger Dingledine
23efc30776
get rid of some unused variables
...
svn:r5451
2005-11-24 01:47:05 +00:00
Nick Mathewson
05482a0899
Add functions to return number of elts in associative containers
...
svn:r5448
2005-11-23 07:48:13 +00:00
Roger Dingledine
0118a236a4
comment that scary-looking function.
...
svn:r5447
2005-11-23 07:30:44 +00:00
Nick Mathewson
eb0021b06e
Fix dumb logic error that kept some old descripttors from getting the axe.
...
svn:r5446
2005-11-23 07:28:54 +00:00
Nick Mathewson
061ef582a1
Make dropping very old descriptors faster (remove old correctness check). Track bytes dropped that are still in our store or journal, and rebuild when it gets very high.
...
svn:r5445
2005-11-23 07:24:59 +00:00
Nick Mathewson
36109fea33
e more aggressive about calling routerlist_remove_old_routers()
...
svn:r5444
2005-11-23 07:06:36 +00:00
Nick Mathewson
fbf8a8c25f
Dump bytes held to store descriptors.
...
svn:r5443
2005-11-23 06:00:58 +00:00
Nick Mathewson
7d7bb95f36
Track how many bytes we have in signed descriptors. Try to make sure we are tracking this right. Somebody should valgrind a dirserver on an example net. There should be code to dump this value.
...
svn:r5442
2005-11-23 05:47:51 +00:00
Nick Mathewson
a39269572f
Replace balanced trees with hash tables: this should make stuff significantly faster.
...
svn:r5441
2005-11-23 04:18:45 +00:00
Nick Mathewson
50ce5e1932
Avoid spurious re-launch of first pending requested descriptor
...
svn:r5439
2005-11-22 02:20:05 +00:00
Roger Dingledine
8182eb69cd
a smidgen more hint when we fail to seed the rng
...
svn:r5438
2005-11-21 01:12:01 +00:00
Peter Palfrader
a48b722432
Ancient gcc does not like you when you declare variables in the middle of a block
...
svn:r5437
2005-11-20 16:53:49 +00:00
Peter Palfrader
b9d37a2d58
Add a new controller event type that allows controllers to get all
...
server descriptors that were uploaded to a router in its role as authoritative
dirserver.
svn:r5436
2005-11-19 18:35:43 +00:00
Roger Dingledine
f28770b639
be less eager to decide that the entire network is down
...
svn:r5434
2005-11-19 11:04:00 +00:00
Roger Dingledine
859d1c902a
and another instance where i was trying to be too sneaky
...
svn:r5433
2005-11-19 10:38:23 +00:00
Roger Dingledine
98f353fa7c
actually listen when we try to route our dir connection via tor.
...
svn:r5432
2005-11-19 10:33:34 +00:00
Roger Dingledine
5c949fce51
Start obeying our firewall options more rigorously:
...
- If we can't get to a dirserver directly, try going via Tor.
- Don't ever try to connect (as a client) to a place our firewall
options forbid.
- If we specify a proxy and also firewall options, obey the firewall
options even when we're using the proxy: some proxies can only proxy
to certain destinations.
svn:r5431
2005-11-19 10:12:10 +00:00
Roger Dingledine
7aae63994f
Recover better from TCP connections to Tor servers that are broken but
...
don't tell you (it happens!); and rotate TLS connections once a week.
1) If an OR conn becomes more than a week old, make it obsolete.
2) If it's obsolete and empty, kill it.
3) When an OR makes a second connection to you, allow it.
4) If we want to send a new create cell, but the best conn we've
got is obsolete, and the router is 0.1.1.9-alpha-cvs or later, ask
for a new conn instead.
5) When we time out on circuit building on the first hop, make that
connection obsolete.
svn:r5429
2005-11-19 06:57:44 +00:00
Roger Dingledine
700c370a3b
misc cleanups
...
svn:r5428
2005-11-19 01:56:58 +00:00
Roger Dingledine
f824fb5f83
Bugfix: it looks like some middleman circuits were spending the
...
first few moments of their existence in CIRCUIT_STATE_OPEN, then
when Alice sent an extend request for a Tor that they're not connected
to, they switched to CIRCUIT_STATE_OR_WAIT and spent the rest of
their sorry little lives in that state, even when the connection
was established and they were shuttling relay cells back and forth.
And I'm not going to backport this (yet), because somehow it worked!
svn:r5427
2005-11-19 01:55:58 +00:00
Roger Dingledine
0de8f4ee55
another case (i think) of redundant code.
...
svn:r5426
2005-11-19 01:03:34 +00:00
Roger Dingledine
409294153f
remove some redundant (and misleading) code
...
svn:r5425
2005-11-19 00:44:24 +00:00
Peter Palfrader
6734371234
15*60 is 15 minutes, not 5
...
svn:r5424
2005-11-18 21:57:49 +00:00
Peter Palfrader
901712ee59
Remove ip address change flapping detection. It is not really needed and I do not think it works quite right.
...
svn:r5423
2005-11-18 19:28:34 +00:00
Roger Dingledine
4ddf2385a0
if it's not less than three does that mean it's more than two?
...
svn:r5422
2005-11-18 11:35:23 +00:00
Roger Dingledine
9d6d6da883
and code the part where redirectstream can take a port.
...
svn:r5421
2005-11-18 11:32:59 +00:00
Roger Dingledine
afb1c79879
Leave options->DirServers alone -- if the user didn't specify any,
...
just add the default ones directly to the trusted dirserver list.
This fixes a bug where people running controllers would setconf or
the equivalent, and Tor would start yelling at them about setting
their own DirServer lines.
svn:r5418
2005-11-18 02:47:09 +00:00
Roger Dingledine
26d8c3498c
and another overly common log entry
...
svn:r5417
2005-11-18 00:35:29 +00:00
Roger Dingledine
aa53190ed5
and another one
...
svn:r5416
2005-11-17 22:23:18 +00:00
Roger Dingledine
9111a3fb48
comment out some really popular log lines
...
svn:r5415
2005-11-17 22:19:35 +00:00
Roger Dingledine
d2b93df26c
and now we actually do it, too.
...
svn:r5414
2005-11-17 22:01:46 +00:00
Roger Dingledine
7dbf2511c3
when you type 'getinfo' with no arguments, it doesn't give you
...
any answer at all. this is clearly a bug.
the more interesting bug is whether things like setconf, getconf,
and so on should return 250 OK if you give them no arguments. should
we have a new "you didn't ask me anything" response code, or just
leave it as is?
svn:r5412
2005-11-17 21:45:38 +00:00
Roger Dingledine
af86345b74
we used to kill the circuit when we receive a relay command we
...
don't recognize. now we just drop it. perhaps this will make us
more forward-compatible? or perhaps it will bite us? one day we
will find out.
svn:r5405
2005-11-17 03:40:20 +00:00
Roger Dingledine
298da4497a
help the term "OP" become obsolete
...
svn:r5403
2005-11-17 01:17:53 +00:00
Roger Dingledine
279e29a1f2
bugfix: the controller doesn't mention it's a .onion if it is.
...
svn:r5400
2005-11-16 23:54:24 +00:00
Roger Dingledine
c4aa9e7941
Add a new config option TestSocks so people can see if their
...
applications are using socks4, socks4a, socks5-with-ip, or
socks5-with-hostname. This way they don't have to keep mucking
with tcpdump and wondering if something got cached somewhere.
svn:r5399
2005-11-16 23:37:35 +00:00
Nick Mathewson
83d6b0387b
Try to build with OpenSSL 0.9.6. Lets pay attention to see if anybody complains.
...
svn:r5398
2005-11-16 05:22:44 +00:00
Nick Mathewson
22aea0757e
Verify that router fingerprint lines match identity keys. (We dont use them, but others might.)
...
svn:r5389
2005-11-15 21:24:32 +00:00
Roger Dingledine
74d1ca66c0
another case where the poor server operator doesn't need to
...
hear about lexi's bugs.
svn:r5388
2005-11-15 20:40:32 +00:00
Roger Dingledine
6465b30f21
bump to 0.1.1.9-alpha-cvs
...
svn:r5387
2005-11-15 20:29:56 +00:00
Roger Dingledine
fe7b07754f
make it even more clear that i didn't screw up the logic
...
svn:r5378
2005-11-15 09:57:58 +00:00
Roger Dingledine
53269f696d
fix logic error: not unnamed is good.
...
svn:r5377
2005-11-15 09:15:43 +00:00
Nick Mathewson
6c361468c1
Loops without an increment step can suck, even on windows.
...
svn:r5376
2005-11-15 03:16:32 +00:00
Nick Mathewson
9b432311c4
Make new logging stuff work on windows; fix a couple of windows typos.
...
svn:r5375
2005-11-15 03:05:23 +00:00
Roger Dingledine
4cd7bddfc3
bump to 0.1.1.9-alpha
...
svn:r5374
2005-11-15 01:47:11 +00:00
Nick Mathewson
e022aa73e6
Hm; looks like the callback business was unnecessary, since DHparams_dup() copies dh->length.
...
svn:r5372
2005-11-14 21:17:38 +00:00
Nick Mathewson
027d0ef18c
Use a callback to set our DH parameters; set SSL_OP_SINGLE_DH_USE.
...
svn:r5371
2005-11-14 19:20:47 +00:00
Nick Mathewson
887178e710
Oops. It looks like there *was* an easy way to make openssl do what we wanted.
...
svn:r5370
2005-11-14 19:18:31 +00:00
Nick Mathewson
669fdde91b
Fix number in error message
...
svn:r5369
2005-11-14 19:17:28 +00:00
Roger Dingledine
4ea6d71a26
shorten more of the startup log messages
...
svn:r5368
2005-11-14 04:39:49 +00:00
Roger Dingledine
6fc30a65fd
when a stream times out, provide less (but better) explanation
...
of what happened. don't bother printing the path, since i don't
know of any person who has gotten anything useful out of that.
svn:r5367
2005-11-14 04:13:43 +00:00
Roger Dingledine
ed4f15b2a7
When logging via syslog, include the pid whenever we provide
...
a log entry. Suggested by Todd Fries.
svn:r5366
2005-11-13 22:28:07 +00:00
Roger Dingledine
014c6bfe00
We were refusing to start if you define SocksListenAddress
...
but define SocksPort to be 0. But this is a standard configuration!
So don't fail.
svn:r5361
2005-11-11 22:41:07 +00:00
Roger Dingledine
5ef2927870
correct nick's comment
...
svn:r5360
2005-11-11 21:44:38 +00:00
Nick Mathewson
f14743a975
Note that much of check_dh_key is voodoo; make x in DH be only 320 bits for DH speed improvement: this wants auditing. [We have blessing from Ian on this.] (Note that DH in SSL is not yet affected.)
...
svn:r5359
2005-11-11 20:18:00 +00:00
Roger Dingledine
a3c53e0af9
speed up the lookup-by-circid-orconn now that it seems that
...
our code works.
svn:r5358
2005-11-11 19:28:32 +00:00
Roger Dingledine
862a997495
when we were cannibalizing a circuit with a particular exit
...
node in mind, we weren't checking to see if that exit node
was already present earlier in the circuit. oops.
svn:r5357
2005-11-11 19:25:30 +00:00
Roger Dingledine
4d1c6bbfc4
fix function comment
...
svn:r5356
2005-11-11 17:16:24 +00:00
Roger Dingledine
c136bbe505
stop discouraging the old *BindAddress config options. we will
...
just confuse our users when they upgrade.
svn:r5354
2005-11-11 17:04:14 +00:00
Roger Dingledine
e6fd88c698
simplify a log entry
...
svn:r5353
2005-11-11 17:03:35 +00:00
Roger Dingledine
c074f528c1
fix a harmless warn and mark two points where we should
...
maybe change our approach.
svn:r5352
2005-11-11 17:01:20 +00:00
Nick Mathewson
b76f61ee66
If we stop knowing about a dirserver between request and answer, do not die.
...
svn:r5351
2005-11-08 22:30:17 +00:00
Peter Palfrader
43c253958e
Tor26's IP has changed to 86.59.21.38
...
svn:r5350
2005-11-05 20:20:51 +00:00
Nick Mathewson
75d85c8214
On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
...
svn:r5349
2005-11-05 20:15:27 +00:00
Nick Mathewson
757def59b6
Fix bugs in routerlist_remove_old_cached_routers_with_id()
...
svn:r5348
2005-11-04 16:47:26 +00:00
Nick Mathewson
a913cb3536
prevent duplicat mark-for-close
...
svn:r5347
2005-11-04 05:00:12 +00:00
Nick Mathewson
9e82f0cdb7
enable code to remove members of old_routers when it gets big.
...
svn:r5345
2005-11-01 17:34:17 +00:00
Nick Mathewson
80758473f8
fix a signed/unsigned warning
...
svn:r5344
2005-11-01 17:28:49 +00:00
Roger Dingledine
87e8e7b4fa
using an unsigned int for something that requires at least 3 bytes
...
makes me uncomfortable.
svn:r5340
2005-11-01 06:15:48 +00:00
Roger Dingledine
40ecaf4857
answer nick's XXX, and muck with some log domain choices
...
svn:r5339
2005-11-01 06:13:12 +00:00
Roger Dingledine
c68cadc0c8
tor_assert had a misleading comment
...
svn:r5338
2005-11-01 06:12:51 +00:00
Roger Dingledine
6dafca62f0
remove redundant checking for . and .. now that
...
tor_listdir() checks for this too.
svn:r5337
2005-11-01 03:50:14 +00:00
Roger Dingledine
1991f6cf48
more doc cleanups and reorganizing
...
svn:r5336
2005-11-01 03:48:51 +00:00
Roger Dingledine
a2a4f4ae61
cleanups and a smidgen more docs
...
svn:r5335
2005-11-01 03:47:55 +00:00
Roger Dingledine
44b3f3060a
make circ->onionskin a pointer, not a static array. moria2 was using
...
125000 circuit_t's after it had been up for a few weeks, which translates
to 20+ megs of wasted space.
svn:r5333
2005-10-29 19:13:48 +00:00
Roger Dingledine
bf2be9abd7
Do round-robin writes of at most 16 kB per write. This might
...
be more fair on loaded Tor servers, and it might resolve our
Windows crash bug. It might also slow things down.
svn:r5332
2005-10-29 18:19:37 +00:00
Roger Dingledine
862e8a1bd1
fix typo
...
svn:r5331
2005-10-29 18:00:25 +00:00
Nick Mathewson
f2617c6b79
Free the v2 directory networkstatus on exit. (Not a leak.)
...
svn:r5330
2005-10-29 05:01:12 +00:00
Nick Mathewson
4cb2435388
aaand another leak. Oops, I guess I lied to weasel when I told him there was no leak here.
...
svn:r5329
2005-10-28 19:10:53 +00:00
Nick Mathewson
ed32d85a04
router_add_to_routerlist() really needs to free not-added routers.
...
svn:r5328
2005-10-28 18:44:51 +00:00
Nick Mathewson
76988bafbe
Fix bug when parsing list of router descriptors containing a truncated entry. (Found by Lasse)
...
svn:r5327
2005-10-28 15:56:19 +00:00
Nick Mathewson
267af9ecf9
Fix a fun bug that was probably causing unnecessary downloads, and that coupld possibly have caused some segfaults: When post-processing a split fingerprint URL, we were trying to base16_decode() entries already in the fingerprint list, failing, and removing them. Ow.
...
svn:r5326
2005-10-27 23:16:08 +00:00
Nick Mathewson
7643c5254c
Fix an annoying rep violation bug
...
svn:r5325
2005-10-27 23:06:09 +00:00
Roger Dingledine
cb785f7b42
fix a url in the sample torrc
...
svn:r5324
2005-10-27 02:36:52 +00:00
Nick Mathewson
e594ce92fe
Start making directory caches retain old routerinfo_t. The code to remove old ones is definitely some textbook C problem.
...
svn:r5323
2005-10-27 00:34:39 +00:00
Nick Mathewson
3c36a14ba6
Call ERR_remove_state() on the main thread on shutdown,too
...
svn:r5322
2005-10-26 02:20:48 +00:00
Nick Mathewson
9492424d3f
Per comments at the bottom of openssl/FAQ, call even more functions to
...
clean up OpenSSL's toys when it's done playing. (Why isn't there an
OpenSSL_free_everything() function?)
svn:r5321
2005-10-25 19:01:48 +00:00
Nick Mathewson
b39d03116b
remove some commented-out code that may tempt us to do ill
...
svn:r5320
2005-10-25 18:38:44 +00:00
Nick Mathewson
e5633c2e66
fix a nasty corruption bug
...
svn:r5319
2005-10-25 18:33:33 +00:00
Nick Mathewson
35f1b7fa26
fix minor memory leak in config
...
svn:r5318
2005-10-25 18:06:29 +00:00
Nick Mathewson
5d85560d9e
Remove last vestiges of old logging interface.
...
svn:r5317
2005-10-25 18:01:01 +00:00
Roger Dingledine
d7e136240a
consistency is the hobgoblin of little armas
...
svn:r5316
2005-10-25 17:58:43 +00:00
Nick Mathewson
049f6c0131
Switch remaining files to new log interface.
...
svn:r5315
2005-10-25 17:52:14 +00:00
Nick Mathewson
7a9774eff0
Also here.
...
svn:r5314
2005-10-25 17:42:09 +00:00
Peter Palfrader
0738c24b97
Fix log levels notice and warn for new logging stuff
...
svn:r5313
2005-10-25 17:41:43 +00:00
Nick Mathewson
a38aa81bf8
fix another segv, this time in circid fix.
...
svn:r5312
2005-10-25 15:31:25 +00:00
Nick Mathewson
9b6c5614c6
fix a segv
...
svn:r5311
2005-10-25 15:30:02 +00:00
Nick Mathewson
e7e170a59e
Change more files to new loggin interface. 3 left.
...
svn:r5310
2005-10-25 08:20:10 +00:00
Nick Mathewson
932106f54c
Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
...
svn:r5309
2005-10-25 07:05:03 +00:00
Nick Mathewson
452f4cfa09
Convert circuituse, command, config, connection, relay, router, test to new logging interface
...
svn:r5308
2005-10-25 07:04:36 +00:00
Nick Mathewson
81dd50a942
Fix memory leak when retrieving networkstatus or routerdesc by malformed fingerprint
...
svn:r5307
2005-10-25 07:03:22 +00:00
Nick Mathewson
91a666064a
Fix possible free(NULL) in control.c
...
svn:r5306
2005-10-25 07:02:13 +00:00
Nick Mathewson
26caf69555
Fix possible minor memory leak when parsing helpernode state
...
svn:r5305
2005-10-25 07:00:03 +00:00
Nick Mathewson
f9b0be526e
Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
...
svn:r5302
2005-10-24 19:39:45 +00:00
Nick Mathewson
fa338d85db
Fix one possible source of reuse-a-circuit-id bug; convert circuitbuild to new logging
...
svn:r5301
2005-10-24 19:37:45 +00:00
Nick Mathewson
beaf898fe5
add more domains
...
svn:r5300
2005-10-24 19:36:43 +00:00
Nick Mathewson
a20835ac92
Check for even more windows version flags, and note any we do not recognize.
...
svn:r5297
2005-10-24 18:37:09 +00:00
Nick Mathewson
7f20dec1cd
When warning about a networkstatus fp, we need to put it in hex.
...
svn:r5293
2005-10-24 03:25:12 +00:00
Nick Mathewson
37708e9b1b
Avoid potential infinite recursion when building a descriptor
...
svn:r5292
2005-10-24 03:04:05 +00:00
Roger Dingledine
d6dcd973c3
Oct 19 13:27:24.391 [info] router_reload_networkstatus(): Skipping cached-status file with unexpected name "."
...
Oct 19 13:27:24.391 [info] router_reload_networkstatus(): Skipping cached-status file with unexpected name ".."
svn:r5291
2005-10-20 17:22:00 +00:00
Nick Mathewson
52eaccce44
Crank down the frequency for replacing unchanged descriptors
...
svn:r5290
2005-10-19 16:21:19 +00:00
Nick Mathewson
7b8980a43c
Make it compile. appease roger and his thirst for documentation.
...
svn:r5289
2005-10-19 03:08:50 +00:00
Nick Mathewson
74d9c92c49
We need a routerlist_replace as well. This should do something about those annoying mysterious segfaults.
...
svn:r5288
2005-10-19 03:02:28 +00:00
Roger Dingledine
4df1892db1
solve the first half of bug 199: if we don't like the looks
...
of an address, but it's the controller's job to handle it,
don't refuse it first.
svn:r5287
2005-10-19 02:07:11 +00:00
Nick Mathewson
1bd3f6cc9a
Update more files to new log stuff.
...
svn:r5286
2005-10-18 22:56:40 +00:00
Nick Mathewson
55f2ab9cc3
Migrate a few more files to domained logging
...
svn:r5285
2005-10-18 22:21:29 +00:00
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
Roger Dingledine
102df4a982
fix some typos
...
svn:r5283
2005-10-18 21:39:00 +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
7a19588a43
Use digestmap_t instead of strmap_t where appropriate. Do less hex en/decoding
...
svn:r5279
2005-10-18 20:12:22 +00:00
Nick Mathewson
5828f8920e
Add a "Map from digest to void*" abstraction, since we already faked it in 3 places by encoding keys in hex and sticking them in a strmap.
...
svn:r5278
2005-10-18 20:11:39 +00:00
Nick Mathewson
0349598928
stupid gcc. stupid nickm.
...
svn:r5277
2005-10-18 17:52:45 +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
95514b32a5
Make smartlist_foreach always use the fast versions.
...
svn:r5275
2005-10-18 17:38:07 +00:00
Peter Palfrader
d8daa910a6
Make dirserv_get_routerdescs() return better http 404 error messages instead of a generic "Servers unavailable."
...
svn:r5274
2005-10-18 17:09:57 +00:00
Peter Palfrader
551e3402a3
split send_control1_event() into the printf and the print/dispatch part. The
...
printf part was and is limited to at most 1024 byte messages, so having the print
part separately available makes sense.
svn:r5273
2005-10-18 16:45:43 +00:00
Peter Palfrader
00e1709244
Fix download by SD digest
...
svn:r5272
2005-10-18 15:58:40 +00:00
Peter Palfrader
6e8052e0f8
I wonder what a stautus is.
...
svn:r5271
2005-10-18 15:25:10 +00:00
Peter Palfrader
64a631e187
Some http status lines ended in a dot, others did not. Make it all the same and remove the period from all
...
svn:r5270
2005-10-18 14:57:46 +00:00
Peter Palfrader
0186cb283f
And close the double quote too
...
svn:r5269
2005-10-18 14:34:49 +00:00
Peter Palfrader
d2f1cd4196
Fix documentation of dirserv_get_routerdescs:
...
correct the path for queries by server key, add queries by SD digest
svn:r5268
2005-10-18 14:33:19 +00:00
Nick Mathewson
48ade882c3
Remove assert in sort-of c-itical path
...
svn:r5267
2005-10-18 05:06:36 +00:00
Nick Mathewson
cf73ff195b
Actually, use #defines for common case. Nothing to see here.
...
svn:r5266
2005-10-18 05:03:44 +00:00
Nick Mathewson
768160c872
Inline key smartlist functions; use fast versions by default.
...
svn:r5265
2005-10-18 04:51:07 +00:00
Nick Mathewson
27fcbf87f3
Add a missing struct initializer field
...
svn:r5264
2005-10-17 23:00:08 +00:00
Peter Palfrader
0d9aedfcea
Downgrade a few INFO level logs to DEBUG again. Also add two or three new
...
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.
svn:r5263
2005-10-17 16:21:42 +00:00
Roger Dingledine
bec2271029
fix a few comments
...
svn:r5262
2005-10-17 08:41:58 +00:00
Roger Dingledine
38c6985fff
and update the sample torrc to reflect the *listenaddress notation
...
svn:r5261
2005-10-17 03:23:05 +00:00
Roger Dingledine
fd165329b8
start calling it *ListenAddress rather than *BindAddress,
...
since none of our users know what it means to bind an address or port.
svn:r5260
2005-10-17 03:17:29 +00:00
Nick Mathewson
22c72bd9c5
Add ability to warn when using abbrev mechanism to deprecate option names
...
svn:r5259
2005-10-17 03:06:00 +00:00
Roger Dingledine
435fb973c2
when providing content-type application/octet-stream for providing
...
server descriptors with .z, we were leaving out the content-encoding
header. oops. (everything tolerated this just fine, but that doesn't
mean we need to be part of the problem.)
svn:r5258
2005-10-17 02:32:33 +00:00
Peter Palfrader
7b15f77dd6
Make a few INFO log lines into DEBUG
...
svn:r5257
2005-10-17 02:13:36 +00:00
Roger Dingledine
1be5f4a81b
start hunting down why servers keep getting so many duplicate create cells
...
svn:r5255
2005-10-17 01:46:47 +00:00
Roger Dingledine
ae92a91d96
more log uncluttering
...
svn:r5254
2005-10-17 01:29:28 +00:00
Roger Dingledine
03dcef4c78
start the process of reducing clutter in server logs
...
svn:r5253
2005-10-17 00:35:53 +00:00
Roger Dingledine
aca6fb5f5f
cut out a warning that doesn't need to warn
...
svn:r5252
2005-10-16 19:47:01 +00:00
Roger Dingledine
2a82182243
remove obsolete IgnoreVersion config from or.h
...
svn:r5251
2005-10-16 18:43:41 +00:00
Nick Mathewson
6101468cbe
Enable trivial "download by descriptor digest" functionality.
...
svn:r5250
2005-10-14 04:56:20 +00:00
Nick Mathewson
998cf8d622
Try to extract as many descriptors as possible from truncated http responses. (when DIR_PURPOSE_FETCH_ROUTERDESC)
...
svn:r5249
2005-10-14 02:26:13 +00:00
Nick Mathewson
11b76b9ca5
Allow tor_gzip_uncompress to extract as much as possible from truncated compressed data. Also, fix a bug where truncated compressed data could break tor_gzip_uncompress. [This last part is a backport candidate.]
...
svn:r5247
2005-10-13 22:48:09 +00:00
Peter Palfrader
8808b26206
Check if our IP address has changed every 5 minutes. If it has, update our server descriptor, but not too often
...
svn:r5246
2005-10-12 22:41:16 +00:00
Peter Palfrader
640211e59a
Be a bit more verbose in our AUTHENTICATE error messages in the control protocol so the next guy doesn't blame Nick again
...
svn:r5245
2005-10-12 19:45:35 +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
905ef987e2
Make --hash-password not craash on exit.
...
svn:r5243
2005-10-12 19:08:48 +00:00
Nick Mathewson
9a1d204318
Avoid warning on end-of-function
...
svn:r5242
2005-10-12 18:43:03 +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
bf9ff1c1e7
Do not check whether DirPort is reachable when we are suppressing it because of hibernation. (Backport candidate)
...
svn:r5235
2005-10-12 04:07:10 +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
c48ccf9db4
Insert a newline between all router descriptors when generating (old style) signed directories, in case somebody was counting on that.
...
svn:r5231
2005-10-08 06:02:41 +00:00
Nick Mathewson
2f49e058d0
Now that directory admins assure me they have adjested teir configs, it is safe to make authorities be non-versioning, non-naming by default.
...
svn:r5230
2005-10-08 05:47:58 +00:00
Nick Mathewson
9bc2467626
Okay, try to use RAND_poll() from OpenSSL where available.
...
svn:r5229
2005-10-08 05:47:15 +00:00
Nick Mathewson
48caf912a6
Bump version to 0.1.1.8-alpha-cvs
...
svn:r5228
2005-10-08 05:43:49 +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
2572db2472
Warn less about intro nodes by nickname; remember our own intro nodes by key.
...
svn:r5224
2005-10-07 21:38:44 +00:00
Roger Dingledine
2b3e8ab901
bump to 0.1.1.8-alpha
...
svn:r5222
2005-10-07 20:17:39 +00:00
Roger Dingledine
c4757e0705
LOG_ERR is for when we know we're going to exit. use LOG_WARN in other
...
cases.
svn:r5220
2005-10-07 19:53:57 +00:00
Roger Dingledine
78edd804ff
fix a malformed warning entry
...
svn:r5219
2005-10-07 19:49:48 +00:00
Nick Mathewson
010bcfa9df
Win32 compilation/correctness fixes.
...
svn:r5218
2005-10-07 19:33:47 +00:00
Roger Dingledine
83e119154b
doxygen fix
...
svn:r5217
2005-10-07 19:25:01 +00:00
Nick Mathewson
150e5ac098
disable RAND_poll() for the alpha of the day; at least 24 hours of testing is in order for something like that.
...
svn:r5216
2005-10-07 19:17:20 +00:00
Nick Mathewson
a53ecc94f9
Add half our entropy from RAND_poll in OpenSSL. These know how to use egd (if present) openbsd weirdness (if present), vms/os2 weirdness (if we ever port there), and more in the future.
...
svn:r5215
2005-10-07 19:03:09 +00:00
Roger Dingledine
46af2d26d0
you can't declare variables in the middle of a block
...
svn:r5214
2005-10-07 18:56:21 +00:00
Peter Palfrader
14934dece2
Print address too when we say we cannot bind/listen
...
svn:r5213
2005-10-07 18:48:31 +00:00
Nick Mathewson
4c7113d26a
Strip extra trailing newlines when parsing router descriptors.
...
svn:r5212
2005-10-07 18:33:30 +00:00
Nick Mathewson
a89daaeca9
Once an hour (not just on startup) give OpenSSL some more entropy.
...
Add entropy in 512-bit chunks, not 160-bit chunks. (This latter
change is voodoo.)
svn:r5211
2005-10-06 22:22:22 +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
Roger Dingledine
0e5b6a84eb
without braces, what will hold up the code?
...
svn:r5209
2005-10-06 05:08:00 +00:00
Nick Mathewson
ba24193ab5
Make doxygen marginally happier
...
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
5cf758764e
Rate-limit warnings related to unrecognized MyFamily elements.
...
svn:r5204
2005-10-05 23:20:45 +00:00
Nick Mathewson
ba67d14d40
On sighup, if usehelpernodes changed to 1, use new circuits.
...
svn:r5203
2005-10-05 23:02:40 +00:00
Roger Dingledine
f12663a4ce
call circuit_expire_all_dirty_circs() on do_hup().
...
there, now we use it.
svn:r5202
2005-10-05 22:36:33 +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
039edb3dbb
Downgrade too-frequent "nothing happened" message from info to debug
...
svn:r5200
2005-10-05 22:32:59 +00:00
Roger Dingledine
c3aac3ff6b
infrastructure for the 'change pseudonym' button.
...
not used yet.
svn:r5199
2005-10-05 22:31:21 +00:00
Nick Mathewson
92abf1b653
Make windows platform detection smarter. {Untested.}
...
svn:r5198
2005-10-05 22:04:45 +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
Roger Dingledine
adf04f121e
size_t int printf mucking
...
svn:r5194
2005-10-05 04:52:55 +00:00
Nick Mathewson
96c47c8478
Note the two places where clients will still try to fetch old-style (v1) directory info. These should be fixed, I think.
...
svn:r5193
2005-10-05 02:25:59 +00:00
Nick Mathewson
509de69a7e
reset warning flags on SIGHUP. arma: is this everything?
...
svn:r5192
2005-10-05 02:20:46 +00:00
Roger Dingledine
be478bb56c
stutter therapy lessons
...
svn:r5191
2005-10-05 02:09:27 +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
a608905070
Give a less frequent and more helpful warning on failed serverdesc downloads
...
svn:r5187
2005-10-05 00:22:56 +00:00
Nick Mathewson
42e17182da
When we get an EOF or a timeout on a directory connection, note how many bytes of serverdesc we are dropping. This will help us determine whether it is smart to parse incomplete serverdesc responses.
...
svn:r5186
2005-10-04 22:34:09 +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
e4a6a03249
switch semantics of authdirinvalid/reject
...
svn:r5182
2005-10-04 19:52:58 +00:00
Roger Dingledine
88c37f2d24
comment cleanups
...
svn:r5181
2005-10-04 06:53:59 +00:00
Nick Mathewson
f8c07e1f33
free EVP cipher information on shutdown to remove some spurious dmalloc complaints.
...
svn:r5180
2005-10-03 21:10:35 +00:00
Nick Mathewson
fd04db90b5
Stop leaking storage for EVP keys. (This would be a critical bug if it had ever appeared in a released version.)
...
svn:r5179
2005-10-03 20:53:27 +00:00
Nick Mathewson
c5ee3e961e
Reorganize some quick-and-dirty code to find out what openssl stuff is leaking, using dmalloc.
...
svn:r5178
2005-10-03 20:20:38 +00:00
Nick Mathewson
9e54e2e293
free helper node status info on shutdown
...
svn:r5177
2005-09-30 21:38:57 +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
6e4608701d
and another leak.
...
svn:r5175
2005-09-30 21:31:26 +00:00
Roger Dingledine
ae30c8101b
by convention, addr is a uint32_t and address is a string.
...
that's why we hadn't caught that leak.
svn:r5174
2005-09-30 21:30:04 +00:00
Nick Mathewson
5c5d2e82e6
Fix a leak when launching listeners.
...
svn:r5173
2005-09-30 21:28:00 +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
80f2e10228
Stop leaking or_state_t on shutdown.
...
svn:r5171
2005-09-30 21:16:47 +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
de198d800b
Never call free() on tor_malloc()d memory. This is unlikely to be our current leak, but it may help dmalloc work.
...
svn:r5168
2005-09-30 20:47:58 +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
e28c31ebce
we were leaking some memory every time the client changes IPs
...
svn:r5165
2005-09-30 06:03:04 +00:00
Nick Mathewson
ab245746a9
Hey kids, guess why connection_mark_for_close() started giving an assert when called for an even-numbered line? Right, because I made it a bitfield, when it was really a line number. Why did I think it was a bitfield? A stale comment. Let that be a lesson to us all.
...
svn:r5164
2005-09-30 04:43:42 +00:00
Roger Dingledine
13e709a0ff
resolve nick's comment
...
svn:r5163
2005-09-30 02:08:57 +00:00
Nick Mathewson
26e7a05725
even better function start checks; give dmalloc a chance of working.
...
svn:r5162
2005-09-30 01:39:24 +00:00
Nick Mathewson
edd15cb781
Note that there is incorrect behavior in directory.c code. Arma, please check this too.
...
svn:r5161
2005-09-30 01:38:09 +00:00
Nick Mathewson
92451f74a8
Reformat inconsistent function declarations.
...
svn:r5160
2005-09-30 01:09:52 +00:00
Roger Dingledine
609af664ac
resolve a docdoc
...
svn:r5157
2005-09-30 00:43:40 +00:00
Roger Dingledine
ea18827cee
do the other half of dirport reachability testing.
...
it should be back and working now.
svn:r5155
2005-09-29 23:59:36 +00:00
Roger Dingledine
f8d430653e
better cleanups as i figure out what's going on
...
svn:r5154
2005-09-29 23:26:42 +00:00
Roger Dingledine
d4d8adaa6d
move some code around when we're succeeding or failing at fetching
...
server descs.
also clean up some formatting.
svn:r5153
2005-09-29 23:06:48 +00:00
Roger Dingledine
54a662a542
re-enable dirport testing again
...
(still need the other half, to notice when it has worked.)
svn:r5152
2005-09-29 23:04:01 +00:00
Roger Dingledine
8fc9330686
fix typo
...
svn:r5151
2005-09-29 23:03:34 +00:00
Nick Mathewson
5c53545d81
Add a bunch more warnings to out warning suite; resolve them; pack structs a little better.
...
svn:r5150
2005-09-29 22:59:17 +00:00
Nick Mathewson
c6347cdb0e
suppress all our usual compiler warnings, including a longstanding one from tree.h
...
svn:r5149
2005-09-29 20:49:41 +00:00
Roger Dingledine
8ae6e1c226
Be more conservative about whether to advertise our dirport.
...
The main change is to not advertise if we're running at capacity and
either a) we could hibernate or b) our capacity is low and we're using
a default dirport.
svn:r5148
2005-09-29 06:45:03 +00:00
Roger Dingledine
3559f821a1
clean up some doxygen stuff
...
svn:r5147
2005-09-29 02:54:09 +00:00
Nick Mathewson
2999cbf233
Use EVP_CIPHER_CTX version of AES from openssl, so openssl can use engines (if they exist).
...
svn:r5146
2005-09-27 19:39:25 +00:00
Nick Mathewson
126a1e3e32
Fix crash-on-wakeup bug in networkstatus download.
...
svn:r5144
2005-09-26 16:37:39 +00:00
Roger Dingledine
fba01c3cc0
bugfix: we were whining about using socks4 or socks5-with-local-lookup
...
even when they used an IP in the "virtual" range we designed exactly
for this case.
svn:r5142
2005-09-24 21:56:04 +00:00
Nick Mathewson
0873386600
Point readers of the code to opensslv.h, since everybody who sees 0x0090700f looks at me like some kind of loon
...
svn:r5140
2005-09-24 16:39:33 +00:00
Nick Mathewson
d661fde082
Possible fix to make aes build on woody
...
svn:r5139
2005-09-24 16:37:24 +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
Roger Dingledine
31c7f59b25
add MyFamily to the torrc.sample
...
svn:r5133
2005-09-23 20:53:42 +00:00
Nick Mathewson
ebf6476e8e
Provide dire warnings to any users who set DirServer; move it out of torrc.sample and into torrc.complete.
...
svn:r5132
2005-09-23 20:44:22 +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
Roger Dingledine
0ef18a0fba
put a log message so we can start confirming socks5-with-remote-dns
...
vs socks5-with-local-dns
svn:r5130
2005-09-23 19:56:34 +00:00
Nick Mathewson
96988b45b4
Use OpenSSL AES when OpenSSL has version 0.9.7 or later.
...
svn:r5129
2005-09-23 18:50:50 +00:00
Nick Mathewson
06625e779d
Decouple router downloads from old directory downloads entirely
...
svn:r5128
2005-09-23 18:49:37 +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
Nick Mathewson
faa4f420de
Remove extraneous space on read-history lines.
...
svn:r5123
2005-09-23 17:02:50 +00:00
Roger Dingledine
03d0f62da0
make the numbers in read-history and write-history into uint64s,
...
so they don't overflow and publish negatives in the descriptor.
fixes bug 193.
svn:r5119
2005-09-23 08:29:58 +00:00
Roger Dingledine
512d6ccdc1
and a minor log cleanup
...
svn:r5115
2005-09-23 00:04:53 +00:00
Roger Dingledine
e286c4267e
there was no need to die when we failed to spawn a cpuworker.
...
it handles it fine if we decide not to die.
svn:r5114
2005-09-23 00:04:44 +00:00
Roger Dingledine
479886fce2
remove another loud debug msg
...
svn:r5113
2005-09-22 23:56:56 +00:00
Roger Dingledine
d050ff7906
resolve lucky's recent bug: tor was exiting if we failed to spawn
...
a new dns worker (e.g. because we were out of fd's).
svn:r5112
2005-09-22 23:43:41 +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
Roger Dingledine
959598fae6
content-type bugfixes:
...
http://seppia.noreply.org/tor/dir.z was being declared text/plain
and
http://seppia.noreply.org/tor/server/fp/719BE45DE224B607C53707D0E2143E2D423E74CF
was being declared application/octet-stream
svn:r5108
2005-09-22 00:17:41 +00:00
Roger Dingledine
f011b12df2
bugfix: nobody ever implemented EVENT_ADDRMAP for control protocol
...
version 0, so don't let version 0 controllers ask for it.
svn:r5107
2005-09-21 23:30:15 +00:00
Nick Mathewson
f99b91505b
Make write_escaped_data more bulletproof; backport candidate.
...
svn:r5106
2005-09-21 23:13:29 +00:00
Roger Dingledine
1cfcc4b351
clean up misleading comment on authdir_wants_to_reject_router()
...
svn:r5105
2005-09-21 21:10:36 +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
Roger Dingledine
94ff09af23
clean up a bit more code
...
svn:r5098
2005-09-20 19:50:43 +00:00
Roger Dingledine
19f04ae9c3
make router_is_general_exit match its documentation
...
but it's still wrong maybe
svn:r5095
2005-09-20 03:40:54 +00:00
Nick Mathewson
dcb6b3df6c
bump version to 0.1.1.7-alpha-cvs
...
svn:r5093
2005-09-19 22:02:14 +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
e86893e87b
Move to new base64 digest functions. Switch to new router digest calculation. Make sure there are no duplicates in router status lists.
...
svn:r5088
2005-09-18 02:22:21 +00:00
Nick Mathewson
f8a80e8d59
Helper functions to perform our truncated base64 encoding on hexdigests.
...
svn:r5087
2005-09-18 02:18:59 +00:00
Nick Mathewson
312af36126
Make smartlist_add_all more efficient.
...
svn:r5086
2005-09-18 02:17:02 +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
Roger Dingledine
cce469c5ce
simplify
...
svn:r5081
2005-09-16 06:15:34 +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
d45badd9f4
Add a missing return
...
svn:r5079
2005-09-16 04:52:53 +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
9c2ca40df3
Unify our "figure out which fingerprints we were downloading" code.
...
svn:r5077
2005-09-16 04:42:45 +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
51da58eccf
fix braino in dirserv.
...
svn:r5075
2005-09-15 21:10:58 +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
3dcc4630b9
Make unittests not die
...
svn:r5071
2005-09-15 05:28:18 +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
6973ef9be4
Add a touch_file() function to compat so we can update cache mtimes.
...
svn:r5067
2005-09-14 23:27:52 +00:00
Nick Mathewson
bc0af7046a
Oops. directory_set_dirty() needs to mark networkstatus as dirty too.
...
svn:r5066
2005-09-14 23:14:37 +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
922cee3d0c
Clean up a few warnings that make gcc twig out a bit.
...
svn:r5062
2005-09-14 20:59: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
Roger Dingledine
76e6cc0c2b
bump to 0.1.1.7-alpha
...
svn:r5051
2005-09-14 03:59:33 +00:00
Roger Dingledine
ca727ba6e1
bugfix: when we try to determine the reachability of our dirport,
...
and it doesn't work, don't freak out and mark ourselves as down and
try somewhere else. just calmly fail.
svn:r5050
2005-09-14 03:49:17 +00:00
Nick Mathewson
7c6679d8dc
Add new config.c function to set options that can fail, and roll back if they do. This should solve the setconf-an-impossible-port bug.
...
svn:r5046
2005-09-14 02:36:29 +00:00
Roger Dingledine
93be26a74a
stop the call duplication inside config_assign()
...
svn:r5045
2005-09-14 02:35:06 +00:00
Nick Mathewson
6aa8850d90
note that routerstatus_t.entries is sorted.
...
svn:r5044
2005-09-14 02:28:35 +00:00
Roger Dingledine
10893e7254
simplify
...
svn:r5043
2005-09-14 02:18:28 +00:00
Roger Dingledine
c78aafe4b5
and take the bang out
...
svn:r5042
2005-09-14 02:13:35 +00:00
Roger Dingledine
62fe24c40c
ok, ok, csv's get replaced even when we assign them from the torrc.
...
svn:r5041
2005-09-14 02:12:29 +00:00
Roger Dingledine
1f930a9a70
checkpoint: clean up and document the three ways to call config_assign()
...
and reduce code duplication in config_free() and option_is_same().
svn:r5040
2005-09-14 02:07:35 +00:00
Roger Dingledine
8585599965
correct "your server is reachable" log entries to indicate that it was
...
self-testing that told us so.
svn:r5034
2005-09-13 21:39:42 +00:00
Roger Dingledine
26cc51ffea
a bit more code cleanup
...
svn:r5033
2005-09-13 21:24:51 +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
d9bf9e48c0
Add documentation to a few functions in container.c; reformat function definitions
...
svn:r5026
2005-09-13 15:30:22 +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
d4fb1fcd6c
Two new functions like write_bytes_to_file: one takes a list of byte-and-len structs; one appends.
...
svn:r5024
2005-09-13 06:19:31 +00:00
Roger Dingledine
82b3b6249c
fix a seg fault if we ask an authdirserver for a descriptor by
...
fingerprint but he doesn't know about him.
svn:r5023
2005-09-13 01:20:26 +00:00
Roger Dingledine
8b0d37096b
when the user asked for a rendezvous port that the hidden service
...
didn't want to provide, we were sending an IP address back along
with the end cell. fortunately, it was zero. but stop that anyway.
svn:r5022
2005-09-12 22:05:17 +00:00
Roger Dingledine
569efe61c0
make the patch less likely to bite us later
...
svn:r5021
2005-09-12 21:42:59 +00:00
Nick Mathewson
93c1d37d5f
Resolve stack corruption identified by edmanw in connection_edge_end(). Thanks!
...
svn:r5020
2005-09-12 20:57:16 +00:00
Nick Mathewson
39e29738b1
Maybe I should pay more attention to return values and less to clever comments. Fortunately, the aforementioned comments came out against smacking upside the head.
...
svn:r5018
2005-09-12 08:49:21 +00:00
Nick Mathewson
a6271650d5
Versions should be sorted by version. Lexical sorting should be used only as a last resort.
...
svn:r5017
2005-09-12 08:46:37 +00:00
Roger Dingledine
689cb28098
when writing the recommended*versions lines, sort them first.
...
this is because weasel put his out of order and told me the code
should take care of it.
svn:r5016
2005-09-12 08:31:47 +00:00
Nick Mathewson
c1a6940e73
make compile slightly happier on const-zealous compilers
...
svn:r5015
2005-09-12 08:29:53 +00:00
Nick Mathewson
2689cb081b
We have so many special cases for smartlists of strings, why not add a sort function?
...
svn:r5014
2005-09-12 08:27:01 +00:00
Roger Dingledine
63bb27f19d
be more thorough about noticing when a directory request has failed:
...
it has failed not only when the connection attempt fails, but also
if the conn reaches eof before we get a response that we're happy with.
svn:r5013
2005-09-12 07:36:26 +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
5cebd8df70
remove temporary network-status keyword
...
svn:r5007
2005-09-12 06:14:41 +00:00
Roger Dingledine
89d516f95c
clean up the log entry for when a server posts a server descriptor that
...
the dirserver doesn't like
svn:r5005
2005-09-12 06:08:48 +00:00
Nick Mathewson
8d70ae01b8
Fix a memory leak in smartlist_string_remove.
...
svn:r5002
2005-09-12 05:20:29 +00:00
Nick Mathewson
63dfe2447e
Fix bug found by "ca": looking up a non-existent stream for a v1 control connection would cause a segfault. (No backport needed since 0.1.0 had only v0 connections.)
...
svn:r5001
2005-09-12 03:32:30 +00:00
Nick Mathewson
24bfac635d
Document SMARTLIST_FOREACH macro, along with previously-naughty foo_sl_idx variable.
...
svn:r5000
2005-09-11 23:14:14 +00:00
Roger Dingledine
d7d4d4cbbf
fix comment and return value for check_software_version_against_directory()
...
svn:r4996
2005-09-11 22:36:50 +00:00
Roger Dingledine
b0a5ba4248
downgrade the dirserver log messages when whining about unreachability
...
svn:r4991
2005-09-10 20:40:16 +00:00
Roger Dingledine
cfe34812eb
bugfix: if you gave tor an odd number of command-line arguments,
...
we were silently ignoring the last one. now we complain and fail.
svn:r4988
2005-09-10 04:40:27 +00:00
Roger Dingledine
e782ee344a
bump to 0.1.1.6-alpha-cvs
...
svn:r4987
2005-09-10 03:41:39 +00:00
Roger Dingledine
9b54cd349d
break out a new function config_assign_value() that just assigns the
...
value it's given, and doesn't do any of their weird clearing or resetting
stuff. use that when we're trying to clear or reset values.
svn:r4984
2005-09-10 02:42:32 +00:00
Nick Mathewson
a4f32e77ef
Fix segfault in win32 unittests.
...
svn:r4983
2005-09-10 02:34:32 +00:00
Roger Dingledine
e58ca648c6
bump to 0.1.1.6-alpha
...
this time for sure
svn:r4982
2005-09-10 01:47:27 +00:00
Nick Mathewson
d26523e089
Use tor_listdir in test.c instead of duplicating ode.
...
svn:r4981
2005-09-10 01:42:42 +00:00
Roger Dingledine
1d9786a392
generalize route length to three plus one if the exit node is risky.
...
svn:r4978
2005-09-10 01:01:40 +00:00
Nick Mathewson
035b1953eb
Add sorting/searching to smartlist
...
svn:r4977
2005-09-09 23:12:54 +00:00
Roger Dingledine
cfa321374d
reject ports 465 and 587 by default now too
...
svn:r4974
2005-09-09 22:46:43 +00:00
Nick Mathewson
6b479b3cfa
Only do openssl accel stuff if version is at least 0.9.7
...
svn:r4973
2005-09-09 22:07:15 +00:00
Nick Mathewson
09d83c564b
Add missing arg to windows tor_listdir()
...
svn:r4972
2005-09-09 21:34:59 +00:00
Nick Mathewson
2f6eb10fb4
Implement tor_listdir on windows. Untested.
...
svn:r4971
2005-09-09 21:29:23 +00:00
Nick Mathewson
dcf1e14190
downgrade warning to info
...
svn:r4967
2005-09-09 21:03:57 +00:00
Roger Dingledine
a5ea401b2e
a few more hints on a rare but mysterious warning
...
svn:r4966
2005-09-09 20:58:44 +00:00
Nick Mathewson
047e105daf
Fix a bug in config_dump: we want to run options_validate on the defaults, not (again, uselessly) on the configuration. This was introduced when we made the config code more generic.
...
svn:r4965
2005-09-09 20:08:26 +00:00
Roger Dingledine
35b78b2d8e
clean up the rendezvous warn log msgs, and downgrade some to info
...
svn:r4964
2005-09-09 19:54:28 +00:00
Nick Mathewson
0de64f224e
Warn in more detail when network-status serving and fetching fails. Also, fix a small leak.
...
svn:r4963
2005-09-09 19:37:12 +00:00
Roger Dingledine
42f752a0a5
bugfix: we were automatically condemning an exit node (concluding
...
its advertised exit policy is different from its real one) as soon
as it refused any requests.
After fixing that bug, another bug appeared: we would try the same
server again and again, since once we learned an IP address for a
hostname, we still kept think of it as the hostname. now pass it to
the remapper before trying to reattach.
svn:r4962
2005-09-09 06:11:37 +00:00
Roger Dingledine
843550721a
stop notifying people about dns worker spawning and culling
...
it just freaks them out
svn:r4960
2005-09-09 02:03:31 +00:00
Roger Dingledine
2065c5f7aa
when printing x-forwarded-by headers, don't print the \r
...
svn:r4959
2005-09-09 02:02:20 +00:00
Nick Mathewson
bd911d8612
Fix segfault and memleak when getting many compressed server descs.
...
svn:r4956
2005-09-08 22:00:29 +00:00
Nick Mathewson
659491bbc6
Fix some messages that say "failing".
...
svn:r4955
2005-09-08 21:46:31 +00:00
Nick Mathewson
d410c49965
Clean up some more fingerprint-checking logic
...
svn:r4954
2005-09-08 21:39:39 +00:00
Roger Dingledine
587b513ec0
remove obsolete kludge
...
svn:r4953
2005-09-08 21:36:27 +00:00
Nick Mathewson
9df4716ac3
make it work correctly when we download multiple network-status objects.
...
svn:r4952
2005-09-08 21:28:45 +00:00
Nick Mathewson
4ce0e01848
add conn->requested_resource to connection_t checks.
...
svn:r4951
2005-09-08 21:21:54 +00:00
Nick Mathewson
a938190bdb
Iteration is happier when you stop.
...
svn:r4950
2005-09-08 21:20:20 +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
c523e106b5
Do not generate more than 2 of each directory type per minute.
...
svn:r4946
2005-09-08 20:47:11 +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
6c4d43c724
Special-case for retrieving own networkstatus by fingerprint: regenerate if dirty!
...
svn:r4943
2005-09-08 19:29:21 +00:00
Roger Dingledine
465aec04c1
when reporting results from a dirserver fetch/post, tell us the
...
port for the dirserver too
svn:r4942
2005-09-08 19:21:48 +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
cc16fb7636
oops -- that log should have been removed
...
svn:r4939
2005-09-08 19:12:55 +00:00
Nick Mathewson
e5f117606f
Fix network-status parsing.
...
svn:r4938
2005-09-08 19:10:36 +00:00
Nick Mathewson
b43a720bd4
Fix another reversed inet_aton
...
svn:r4937
2005-09-08 18:53:57 +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
eab005c948
Ensure case match, not mismatch.
...
svn:r4935
2005-09-08 18:34:41 +00:00
Nick Mathewson
c4b3bf06c6
add strupper function
...
svn:r4934
2005-09-08 18:33:51 +00:00
Nick Mathewson
810572a5de
Stop dying when we get a directory from tor26; workaround for change in networkstatus format
...
svn:r4933
2005-09-08 18:24:26 +00:00
Roger Dingledine
4633b271f9
fix spacing
...
svn:r4932
2005-09-08 18:15:57 +00:00
Nick Mathewson
548a863779
Avoid assertion failure
...
svn:r4931
2005-09-08 18:14:23 +00:00
Nick Mathewson
ff9452e900
Clean up should-i-go-to-the-dirserv logic a little: All servers with DirPorts should get their directories from the source
...
svn:r4930
2005-09-08 18:14:01 +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
Roger Dingledine
022f23249f
make doxygen output look prettier
...
svn:r4928
2005-09-08 07:10:12 +00:00
Roger Dingledine
dbeb8e7863
it really does help with the functions end.
...
svn:r4927
2005-09-08 06:59:58 +00:00
Roger Dingledine
74fb086210
if you give a config option in the torrc or the commandline with no
...
value, and reset is false, then it clears it entirely.
svn:r4926
2005-09-08 06:55:53 +00:00
Roger Dingledine
36fa360c11
and fix grammar
...
svn:r4925
2005-09-08 06:49:23 +00:00
Roger Dingledine
69da0ef757
add punctuation
...
svn:r4924
2005-09-08 06:49:02 +00:00
Roger Dingledine
780261aa2e
don't crash now that LongLivedPorts can be null
...
svn:r4923
2005-09-08 06:47:27 +00:00
Nick Mathewson
8f37357193
Make GCC v4 happy with heavy warnings enabled.
...
svn:r4922
2005-09-08 06:37:50 +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
Roger Dingledine
2f6664ce80
MonthlyAccountingStart is dead.
...
svn:r4920
2005-09-08 05:38:47 +00:00
Roger Dingledine
c9e1c41873
dirserv_add_descriptor() doesn't chew up its argument anymore,
...
so we can stop protecting it.
svn:r4919
2005-09-08 05:37:22 +00:00
Roger Dingledine
03ddeb2620
strip obsolete code
...
svn:r4918
2005-09-08 05:32:41 +00:00
Roger Dingledine
0ac3c58480
clean up comments for router_is_general_exit()
...
svn:r4917
2005-09-08 05:23:55 +00:00
Roger Dingledine
08348ae66e
add a RESETCONF controller command, and make setconf with a null
...
option actually mean to set it to ""
svn:r4916
2005-09-08 03:18:51 +00:00
Roger Dingledine
0a8a8ba546
fix some typos
...
svn:r4915
2005-09-08 03:17:50 +00:00
Nick Mathewson
4aca47268d
Logic to launch connections for new directory types.
...
svn:r4914
2005-09-07 20:03:02 +00:00
Nick Mathewson
9e76eae810
add missing return
...
svn:r4913
2005-09-07 17:18:52 +00:00
Nick Mathewson
eac917fd6a
clean whitespace.
...
svn:r4912
2005-09-07 17:15:46 +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
Roger Dingledine
c384fa706d
stop using the v1 rend desc format. we're going to change v1
...
some more before we switch to it.
svn:r4909
2005-09-06 06:14:38 +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
Roger Dingledine
d2a5b614eb
if you're an auth dir server, start yourself out as verified.
...
svn:r4907
2005-09-03 23:10:28 +00:00
Nick Mathewson
b6a13b6cdf
Add directory listing functions to util.[ch]. Watch the features creep!
...
svn:r4906
2005-09-03 04:40:05 +00:00
Roger Dingledine
33b2abbc90
remove redundant logs about unreachable servers
...
svn:r4905
2005-09-03 04:37:30 +00:00
Nick Mathewson
467fd6e4e6
fix order of items in network-status
...
svn:r4904
2005-09-03 02:38:39 +00:00
Nick Mathewson
3485a497fe
Fix another ntohl
...
svn:r4903
2005-09-03 02:23:53 +00:00
Nick Mathewson
ae726e659e
and another byte counting error.
...
svn:r4902
2005-09-03 02:14:31 +00:00
Nick Mathewson
9b949cc1d2
Excellent. We have at least 8 bytes, so I can safely get the 9th.
...
svn:r4901
2005-09-03 02:12:53 +00:00
Nick Mathewson
bcbff6dcd7
Note to self: htonl(htonl(X)) is *not* "twice as good as htonl(X)". Spotted by arma.
...
svn:r4900
2005-09-03 01:47:39 +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
Nick Mathewson
9bc3d34682
Add contact field to generated network-status objects
...
svn:r4897
2005-09-02 20:30:03 +00:00
Nick Mathewson
09e8521236
Make ContactInfo mandatory for authoritative directories.
...
svn:r4896
2005-09-02 20:29:29 +00:00
Nick Mathewson
a6a45b7713
Add TTLs to RESOLVED, CONNECTED, and END_REASON_EXITPOLICY cells. Also, add a missing ntohl in connection_ap_handshake_socks_resolved.
...
svn:r4894
2005-09-02 18:53: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
0b92c28d84
Actually set is_hibernating when parsing router descriptors.
...
svn:r4888
2005-08-30 15:04:24 +00:00
Roger Dingledine
6a52aa52fe
fix a pair of hard-coded urls
...
svn:r4887
2005-08-30 07:01:30 +00:00
Roger Dingledine
4240410a9d
don't whine about reachability if the guy is hibernating now.
...
speaking of which, we don't actually parse is_hibernating out
of the router descriptor right now. nick, can you fix this?
svn:r4886
2005-08-30 06:48:24 +00:00
Roger Dingledine
e9524f9d2d
refactor -- no actual changes
...
svn:r4885
2005-08-30 06:43:07 +00:00
Roger Dingledine
a8c0c51e0b
a bit of cleanup
...
svn:r4884
2005-08-30 06:01:13 +00:00
Nick Mathewson
0691c7221e
Update routerinfo_t.is_running when generating network status on authdirserver.
...
svn:r4883
2005-08-29 18:42:36 +00:00
Nick Mathewson
29a6c17d67
Allow tor_gzip_uncompress to handle multiple concatenated compressed strings.
...
svn:r4882
2005-08-29 18:01:38 +00:00
Nick Mathewson
e3a058f33a
Change semantics of set_cached_dir; fix massive authdir memleak.
...
svn:r4880
2005-08-28 04:20:37 +00:00
Nick Mathewson
26d2301c76
Make unit tests (and others) run without launching listeners, creating subdirectories, and so on.
...
svn:r4876
2005-08-26 23:22:27 +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
e863771485
Log when falling back to nonfast/nonstabl routers
...
svn:r4869
2005-08-26 22:16:32 +00:00
Nick Mathewson
ed070b0fdb
Set a variable that exists. That works better.
...
svn:r4868
2005-08-26 22:16:09 +00:00