Commit Graph

6851 Commits

Author SHA1 Message Date
Nick Mathewson
b166a43cb6 Fix another case of refusing to use a chosen exit node because we think it will reject _mostly_ everything. Based on patch from rovv. See bug 752.
svn:r17139
2008-10-21 17:09:04 +00:00
Nick Mathewson
5e762e6a5c Fix the rest of bug 619: reject *:* servers should not do DNS lookups, even if broken clients send them RELAY_BEGIN cells. Patch from rovv.
svn:r17138
2008-10-21 16:51:59 +00:00
Nick Mathewson
b593fd5c20 Patch from rovv: send back END cell in response to connect attempts to nonexistent hidden service port.
svn:r17137
2008-10-21 16:41:20 +00:00
Roger Dingledine
bca46cc628 backport candidate:
The "ClientDNSRejectInternalAddresses" config option wasn't being
consistently obeyed: if an exit relay refuses a stream because its
exit policy doesn't allow it, we would remember what IP address
the relay said the destination address resolves to, even if it's
an internal IP address. Bugfix on 0.2.0.7-alpha; patch by rovv.


svn:r17135
2008-10-17 22:08:49 +00:00
Roger Dingledine
e3127e874e fix grammar in a log message
svn:r17131
2008-10-16 17:13:28 +00:00
Roger Dingledine
bbf0f5a266 explain patch4 better. whee.
svn:r17111
2008-10-15 21:12:51 +00:00
Roger Dingledine
a5769eefa4 patch4 from proposal 155:
Hidden services start out building five intro circuits rather
than three, and when the first three finish they publish a service
descriptor using those. Now we publish our service descriptor much
faster after restart.


svn:r17110
2008-10-15 20:59:48 +00:00
Roger Dingledine
d06182f0bd add patch2 from proposal 155:
Launch a second client-side introduction circuit in parallel
after a delay of 15 seconds (based on work by Christian Wilms).


svn:r17108
2008-10-15 18:52:06 +00:00
Roger Dingledine
4520500cde put in karsten's patch #1 for proposal 155, modified
svn:r17106
2008-10-15 00:36:09 +00:00
Nick Mathewson
846e40d193 Patch from rovv: when we have no pending streams, choose exits with choose_good_exit_server_general() rather than with circuit_get_unhandled_ports() and friends. Bugfix on 0.1.1.x, at least.
svn:r17091
2008-10-14 17:05:52 +00:00
Roger Dingledine
d7cfa1f56c Minor fix in the warning messages when you're having problems
bootstrapping; also, be more forgiving of bootstrap problems when
we're still making incremental progress on a given bootstrap phase.


svn:r17066
2008-10-13 03:34:29 +00:00
Roger Dingledine
c9bddb24b2 another coverity-found memory leak
svn:r17062
2008-10-12 03:21:05 +00:00
Roger Dingledine
95aace5aae minor memory leak found by coverity
svn:r17061
2008-10-12 03:19:17 +00:00
Roger Dingledine
bb1f488dbe fix typo in log entry
svn:r17050
2008-10-08 10:47:23 +00:00
Roger Dingledine
e7f5a07ff4 Make rend_cache_store() use the same return error codes as its v2
equivalent: I got a lonely "Failed to fetch rendezvous descriptor."
in my log file, even when the connection worked.


svn:r17028
2008-10-02 07:32:13 +00:00
Roger Dingledine
e24b812a32 time for another alpha-dev cycle
svn:r17023
2008-10-01 08:26:57 +00:00
Roger Dingledine
c7af43a624 Now NodeFamily and MyFamily config options allow spaces in
identity fingerprints, so it's easier to paste them in.
Suggested by Lucky Green.


svn:r17021
2008-10-01 03:41:33 +00:00
Nick Mathewson
ccede03cc0 Switch a should-benee-dless check for an assert.
svn:r17018
2008-09-30 13:59:12 +00:00
Roger Dingledine
a04baf14b6 bump to 0.2.1.6-alpha, and note that the exclude*nodes config
discussion hasn't finished.


svn:r17011
2008-09-30 09:37:18 +00:00
Roger Dingledine
f2708dd40f a few more tweaks
svn:r17010
2008-09-30 09:32:26 +00:00
Roger Dingledine
49a250b208 i *think* this is equivalent. somebody should check me on it though.
svn:r17009
2008-09-30 08:45:40 +00:00
Roger Dingledine
7247838a25 v3 authorities write down all the votes they used for the consensus
to the datadir, for debugging.


svn:r17008
2008-09-29 23:13:43 +00:00
Nick Mathewson
25f8335528 Include circuit purposes in circuit events. Now all circuit events are extended; this makes the code simpler.
svn:r17007
2008-09-29 22:34:22 +00:00
Nick Mathewson
9d950f7d25 Nobody calls circuit_launch_by_nickname; remove it.
svn:r17006
2008-09-29 20:44:29 +00:00
Roger Dingledine
26aa741169 Remove the old v2 directory authority 'lefkada' from the default
list. It has been gone for many months.


svn:r17005
2008-09-29 19:27:20 +00:00
Nick Mathewson
ae3ce7b387 Patch from mwenge: update TrackHostExits mapping expiry times when the mappings are used, so that they expire a while after their last use, not a while after their creation.
svn:r17004
2008-09-29 14:53:53 +00:00
Nick Mathewson
57db1c1a7d Tweak the dbg-stability.txt code to log everything else that influences router stability calculations.
svn:r17003
2008-09-29 14:40:34 +00:00
Nick Mathewson
ee0078ead4 Make tor-resolve take a -p port option in addition to the current host:port syntax.
svn:r17002
2008-09-29 14:18:47 +00:00
Roger Dingledine
9678f166a8 If we have correct permissions on $datadir, we complain to stdout
and fail to start. But dangerous permissions on
$datadir/cached-status/ would cause us to open a log and complain
there. Now complain to stdout and fail to start in both cases. Fixes
bug 820, reported by seeess.


svn:r16998
2008-09-29 10:09:05 +00:00
Roger Dingledine
c846979ab7 Fix a bug where an unreachable relay would establish enough
reachability testing circuits to do a bandwidth test -- if
we already have a connection to the middle hop of the testing
circuit, then it could establish the last hop by using the existing
connection. Bugfix on 0.1.2.2-alpha, exposed when we made testing
circuits no longer use entry guards in 0.2.1.3-alpha.


svn:r16997
2008-09-29 09:36:42 +00:00
Nick Mathewson
99755f374d Fix 0/0 calculation in get_weighted_fractional_uptime().
svn:r16994
2008-09-28 15:48:36 +00:00
Nick Mathewson
bb1685318c Commit fix for bug 807 from mwenge: send CLOSED controller event for reverse dns resolve, not FAILED.
svn:r16985
2008-09-26 20:25:35 +00:00
Nick Mathewson
745e5b0e22 Make sure ExcludeSingleHopRelays works for an exit.
svn:r16984
2008-09-26 19:09:12 +00:00
Nick Mathewson
e147e867be Proposal 152 implementation from Josh Albrecht, with tweaks.
svn:r16983
2008-09-26 18:58:45 +00:00
Nick Mathewson
87eb230c01 Put the start-of-downtime value in the start-of-downtime buffer so that we do not put junk in the dbg-stability.txt file
svn:r16982
2008-09-26 18:31:22 +00:00
Nick Mathewson
e7e12236ac Code to serve a current stability calculations from /tor/dbg-stability.txt. Untested: somebody please run this on an authority and let me know if it is broken.
svn:r16981
2008-09-26 18:02:48 +00:00
Nick Mathewson
283b95e463 Make tests pass again by adding an opt hidden-service-dir to the example routerinfo output.
svn:r16980
2008-09-26 17:58:35 +00:00
Nick Mathewson
ae33d3ead7 Apply rovv's fix for bug 824.
svn:r16975
2008-09-26 15:30:26 +00:00
Nick Mathewson
02c71a7eb4 Widen the conditions under which we whine about not having a geoip file to include "a country code was configured in a node list."
svn:r16968
2008-09-25 21:06:32 +00:00
Nick Mathewson
e06f140f97 Whitespace fixes.
svn:r16967
2008-09-25 20:22:17 +00:00
Nick Mathewson
8bbbbaf87b Add country-code support to configured node lists to implement the ever-popular "no exits in Monaco" feature (ExcludeExitNodes {MC}). Also allow country codes and IP ranges in ExitNodes. (EntryNodes needs more work.) Based on code by Robert Hogan. Needs more testing.
svn:r16966
2008-09-25 20:21:35 +00:00
Nick Mathewson
b2c7090da6 Make it easier for dmalloc to see if keys are leaking; remove a test-only key leak.
svn:r16965
2008-09-25 17:37:00 +00:00
Nick Mathewson
06f96363fd Remove now-needless _tor_dmalloc_free helper.
svn:r16964
2008-09-25 17:36:09 +00:00
Nick Mathewson
a7e383af19 More test memory-management fixes
svn:r16963
2008-09-25 15:20:38 +00:00
Karsten Loesing
f2ff3e74ae All relays now store and serve v2 hidden service descriptors by default (not only directory mirrors).
svn:r16961
2008-09-24 22:33:47 +00:00
Karsten Loesing
9a7098487b If we are not using BEGIN_DIR cells, don't attempt to contact hidden service directories with non-open dir port.
svn:r16960
2008-09-24 22:29:22 +00:00
Nick Mathewson
7f805aca2b Split test_crypto() into manageable pieces.
svn:r16959
2008-09-24 20:55:38 +00:00
Karsten Loesing
5f457e4fa6 Minor correction of commentation.
svn:r16958
2008-09-24 17:33:07 +00:00
Nick Mathewson
8bc1536a9e Add patch 4 from Karsten for proposal 121, slightly modified. Karsten should definitely re-review the bits I changed.
svn:r16955
2008-09-24 14:44:29 +00:00
Roger Dingledine
982a22a121 fix typo
svn:r16949
2008-09-24 00:49:29 +00:00
Nick Mathewson
75977fd79b Patch from roger for 752, but with more comments: When we get an A.B.exit:P address, and B would reject most connections to P, but we do not know whether it would allow A, then allow the connection to procede. Bugfix, amusingly, on 0.0.9rc5.
svn:r16944
2008-09-23 20:25:01 +00:00
Nick Mathewson
545b317e1f Fix for bug 797 (by arma, with tweaks): always use create_fast for circuits where we do not know an onion key.
svn:r16942
2008-09-23 20:13:23 +00:00
Nick Mathewson
f28fc83ea5 More logging for mtbf/wfu calculations.
svn:r16941
2008-09-23 18:24:20 +00:00
Roger Dingledine
29abfab8bf Update to the "September 1 2008" ip-to-country file.
svn:r16940
2008-09-23 09:51:05 +00:00
Karsten Loesing
e4942e809e Exclude v0 rendezvous descriptors when considering republication.
svn:r16939
2008-09-23 09:30:57 +00:00
Roger Dingledine
6a7abbd25d ok, but inaccurate error strings worse
svn:r16938
2008-09-23 08:57:30 +00:00
Roger Dingledine
0fc0d5266c identical error strings in different contexts bad
svn:r16937
2008-09-23 08:54:03 +00:00
Nick Mathewson
b0c48d8e45 Oops; we need to make sure that DNS request names are matched in the _questions_ section of the replies. Rejecting answers whether the _answers_ section did not match made us reject A records waiting at the end of a CNAME record. Bug 823.
svn:r16933
2008-09-22 20:06:25 +00:00
Roger Dingledine
4fd9880540 give rend_client_desc_here a slightly more accurate name
svn:r16916
2008-09-16 10:26:15 +00:00
Roger Dingledine
38f2272d5d patch from karsten for bug 814. whew.
svn:r16915
2008-09-16 10:17:04 +00:00
Nick Mathewson
3db8c15287 Add a circuit_conforms_to_options() function for use in debugging paths [and inother stuff too]. Untested, and so far unused.
svn:r16914
2008-09-15 22:29:47 +00:00
Roger Dingledine
2bde30efa6 read_to_buf should take an int *error_socket and return it.
svn:r16909
2008-09-14 08:35:41 +00:00
Roger Dingledine
7f2fd34645 stop telling us every time we fetch a consensus. that's not really news.
svn:r16908
2008-09-14 07:17:44 +00:00
Roger Dingledine
dbb481c169 Serve the latest v3 networkstatus consensus via the control
port. Use "getinfo dir/status-vote/current/consensus" to fetch it.


svn:r16907
2008-09-14 04:07:29 +00:00
Roger Dingledine
4045ef72f5 make it explicit that the uncompressed cached dir items are nul-terminated
(they are, but now we should keep them that way)


svn:r16906
2008-09-14 03:36:54 +00:00
Roger Dingledine
2d95accc75 Allow ports 465 and 587 in the default exit policy again. We had
rejected them in 0.1.0.15, because back in 2005 they were commonly
misconfigured and ended up as spam targets. We hear they are better
locked down these days.


svn:r16898
2008-09-13 10:04:42 +00:00
Karsten Loesing
f0a5ef804f Directory mirrors store and serve v2 hidden service descriptors by default.
svn:r16858
2008-09-11 20:06:04 +00:00
Nick Mathewson
b322348e8a Fix more actual test leaks
svn:r16831
2008-09-10 05:34:03 +00:00
Nick Mathewson
45205126fe Fix some apparent leaks in voting. If authorities suddenly start segfaulting, this could be a patch to look harder at.
svn:r16830
2008-09-10 05:33:49 +00:00
Nick Mathewson
aa69d586ea Make buffer unit tests handle resource leaks properly.
svn:r16823
2008-09-10 00:16:32 +00:00
Nick Mathewson
38f56608d9 Make more unit tests handle resource leaks properly.
svn:r16822
2008-09-10 00:11:53 +00:00
Karsten Loesing
52fbfc5d45 Correct indentation.
svn:r16819
2008-09-09 22:19:41 +00:00
Roger Dingledine
659f1651e0 tweak karsten's patch
svn:r16818
2008-09-09 21:09:15 +00:00
Roger Dingledine
2c14705a4d patch from karsten to fix more of bug 767
svn:r16817
2008-09-09 21:08:02 +00:00
Nick Mathewson
f95d7c189b Refactor unit test macros and tor_free_all() logic a bit so as to make it easier to free memory on failing tests, in order to suppress scanner warnings and to make dmalloc() usable with tests.
svn:r16816
2008-09-09 20:43:31 +00:00
Nick Mathewson
6c432a5565 Replace the dummy-use var in SMARTLIST_FOREACH_END() with one that is less likely to confuse analysis tools into thinking we do use after free. Arguably, (void)x should count as use in suppressing unused variable warnings, but not in generating hey-you-used-a-variable warnings. Arguably, though, it shouldn't.
svn:r16815
2008-09-09 19:29:33 +00:00
Roger Dingledine
fa64d8041f minor cleanups on karsten's patch
svn:r16810
2008-09-09 09:21:21 +00:00
Roger Dingledine
ef7af1d61e karsten's patch for bug 767.
svn:r16808
2008-09-09 08:41:58 +00:00
Roger Dingledine
d37fae2f4e Catch and report a few more bootstrapping failure cases when Tor
fails to establish a TCP connection. Cleanup on 0.2.1.x.


svn:r16803
2008-09-09 06:25:39 +00:00
Nick Mathewson
aacda9cd8e We should not alter an addr_policy_t that has been canonicalized.
svn:r16802
2008-09-09 03:48:01 +00:00
Nick Mathewson
baeb260ad1 Refactor use of connection_new so that we get more verifiable typesafety.
svn:r16785
2008-09-05 22:09:44 +00:00
Nick Mathewson
339f094056 Refactor some code and add some asserts based on scanner results.
svn:r16783
2008-09-05 21:19:53 +00:00
Nick Mathewson
a345506672 Add an assert to make tools happier.
svn:r16782
2008-09-05 20:59:09 +00:00
Nick Mathewson
d5b2dab31d Fix a malloc that should have been a tor_malloc
svn:r16780
2008-09-05 20:53:39 +00:00
Nick Mathewson
0b8117a5c0 Fix numerous memory leaks: some were almost impossible to trigger, and some almost inevitable.
svn:r16779
2008-09-05 20:52:15 +00:00
Nick Mathewson
4d94e061c7 Clean up some redundant stuff in crypto_dh_new().
svn:r16778
2008-09-05 20:18:22 +00:00
Nick Mathewson
a56a072f29 It is probably some kind of misdeed to say for (i=0;i<2;++i) { A=i?x:y; foo(bar(A)); } rather than foo(bar(x)); foo(bar(y)); . Also, it can confuse tools.
svn:r16777
2008-09-05 20:04:27 +00:00
Nick Mathewson
a6ea2b056a Fix a memory leak in tor-gencert.c
svn:r16776
2008-09-05 19:55:04 +00:00
Nick Mathewson
8ea780632f Make severity args to add_*_log() functions be const
svn:r16775
2008-09-05 19:52:44 +00:00
Nick Mathewson
c33dde4ac1 Fix mingw build with --enable-gcc-warnings set.
svn:r16759
2008-09-04 21:58:09 +00:00
Nick Mathewson
fa2f72ded7 An asterisk makes a difference sometimes. Fixes bug 809.
svn:r16758
2008-09-04 20:42:02 +00:00
Nick Mathewson
3f2b7078d2 Use warn_too_many_conns() when accept() fails with a resource limit.
svn:r16751
2008-09-04 15:22:55 +00:00
Roger Dingledine
ed45a42f98 take out the crazy line from last night that made no sense. apparently
it does work for tas after all.


svn:r16724
2008-09-01 21:24:25 +00:00
Roger Dingledine
9f823f54d5 remove some redundant includes. i expect the first one to be a problem
for tas, but who knows.


svn:r16723
2008-09-01 21:16:07 +00:00
Nick Mathewson
f80ac31d74 Add a lockfile to the Tor data directory to avoid situations where two Tors start with the same datadir, or where a --list-fingerprints races with a server to create keys, or such.
svn:r16722
2008-09-01 20:06:26 +00:00
Roger Dingledine
6a29ad853b bump to 0.2.1.5-alpha-dev
svn:r16715
2008-09-01 08:09:31 +00:00
Roger Dingledine
04eded4a5c take out a line that i think is extraneous. come on, what could
go wrong?


svn:r16714
2008-09-01 08:01:40 +00:00
Roger Dingledine
6942bd66ea Fix compile on OpenBSD 4.4-current. Bugfix on 0.2.1.5-alpha.
Reported by Tas.


svn:r16713
2008-09-01 08:01:22 +00:00
Roger Dingledine
e5576a66dd bump to 0.2.1.5-alpha
svn:r16708
2008-08-31 22:33:33 +00:00
Roger Dingledine
cfff21e78a backport candidate:
If not enough of our entry guards are available so we add a new
one, we might use the new one even if it overlapped with the
current circuit's exit relay (or its family). Anonymity bugfix
pointed out by rovv.


svn:r16698
2008-08-31 06:33:39 +00:00