Roger Dingledine
a53ebd20f0
whitespace fix
...
svn:r17379
2008-11-24 02:02:48 +00:00
Nick Mathewson
c7910c3bc9
Consider GetNetworkParams() nameserver parsing to have suceeded if even one nameserver can be added. Log more useful info about what exactly is failing when we fail to add a nameserver.
...
svn:r17368
2008-11-22 21:46:34 +00:00
Roger Dingledine
0b7a2a505e
prepare_for_poll() -- plus its mysterious cousin, prepare_for_pool() --
...
are long gone.
svn:r17351
2008-11-21 14:07:57 +00:00
Nick Mathewson
0fa698d84f
apply sebastian's bug 867 fix: make routerset_equal() work as documented with NULL arguments
...
svn:r17287
2008-11-16 18:25:20 +00:00
Karsten Loesing
6d7951c022
Fix a possible segfault when establishing an exit connection. Bugfix on 0.2.1.5-alpha.
...
svn:r17275
2008-11-16 01:52:44 +00:00
Nick Mathewson
c36ddcbabf
Apparently sparc64 is way more strict about uint16_t access alignment than I had thought: it gave bus errors when messing with var-cell headers. Maybe this patch will fix bug 862.
...
svn:r17262
2008-11-12 14:41:44 +00:00
Nick Mathewson
8f1952bf11
Be even _more_ careful when signatures are bogus.
...
svn:r17252
2008-11-11 17:14:12 +00:00
Nick Mathewson
3970c34f10
Only replace the detached signatures object when we actually added or replaced at least one signature.
...
svn:r17250
2008-11-11 16:52:07 +00:00
Nick Mathewson
997aea74dc
Fix from rovv: when adding a detached signature, do not automatically assume it is good just because we are adding it. We might also be adding it because it was the first signature we saw for a given voter.
...
svn:r17248
2008-11-11 16:35:46 +00:00
Nick Mathewson
00a90177fa
oops, remove debugging log message.
...
svn:r17247
2008-11-11 16:02:23 +00:00
Nick Mathewson
8157b8b766
be less aggressive about deleting expired certs. based on patch from rovv. partial fix for bug 854.
...
svn:r17246
2008-11-11 16:01:57 +00:00
Nick Mathewson
e08cbe2029
Add PURPOSE= field to getinfo circuit-status. With luck, controllers are ignoring extra fields (like they are supposed to) and this will not break any controllers.
...
svn:r17245
2008-11-11 15:59:24 +00:00
Nick Mathewson
6c50ab6e61
Document a couple of functions.
...
svn:r17239
2008-11-10 20:40:01 +00:00
Roger Dingledine
c62d5f6a5c
beg nick for some documentation on the locking functions
...
svn:r17233
2008-11-10 00:48:13 +00:00
Roger Dingledine
4d8799b987
we missed a case when printing circuit purposes in circ events.
...
svn:r17230
2008-11-09 23:56:29 +00:00
Nick Mathewson
9f1e06bd0e
but to not attempt to download a specific certificate we already have.
...
svn:r17214
2008-11-07 15:01:49 +00:00
Nick Mathewson
bda4ca065c
Aaaaand, do not reset the download count just because we have a certificate that is listed in a consensus.
...
svn:r17212
2008-11-07 14:57:14 +00:00
Nick Mathewson
aa405f29e6
fix up signs in r17208
...
svn:r17211
2008-11-07 14:17:46 +00:00
Nick Mathewson
5e2cdc1666
When we get a duplicated certificate, treat it as a failure and increment the download count. Do not claim to be downloading certificates that we merely want.
...
svn:r17209
2008-11-07 14:01:44 +00:00
Nick Mathewson
a15bdd3edd
patch from karsten to not use or accept expired certs. fixes bug 851.
...
svn:r17208
2008-11-07 13:38:49 +00:00
Roger Dingledine
bc128c0b03
vidalia asks us for the value of the Group config option. but now
...
it's obsolete. which causes us to inform the user every time, even
though the user can't do anything about it other than get confused.
now it's an info-level log by default.
svn:r17206
2008-11-07 04:38:58 +00:00
Roger Dingledine
14773f42a7
now that we drop privs more thoroughly, switch_id() is no longer
...
idempotent. so now we remember if we've succeeded, and if so we
don't even try.
svn:r17204
2008-11-07 04:34:47 +00:00
Roger Dingledine
d27337bf17
i needed a piece of the 'patching patches' action too
...
svn:r17202
2008-11-07 03:39:19 +00:00
Steven Murdoch
9d68ed08e9
Patch from Jacob Appelbaum and me to make User option more robust, properly set supplementary groups, deprecated the Group option, and log more information on credential switching
...
svn:r17200
2008-11-07 02:06:12 +00:00
Nick Mathewson
6e3de8530e
Remove bug 811/845 debugging code
...
svn:r17199
2008-11-07 01:50:37 +00:00
Nick Mathewson
a38026bb06
fix wide lines
...
svn:r17198
2008-11-07 01:48:55 +00:00
Nick Mathewson
3ebd1ebeca
The chunk_size field in memarea_t was never actually set. Remove the whole thing.
...
svn:r17195
2008-11-05 20:34:22 +00:00
Nick Mathewson
3f858b5b26
Fix a compile error found under pcc. It wants single-quites to be escaped in strings, it seems.
...
svn:r17191
2008-11-05 18:03:14 +00:00
Karsten Loesing
b31e2c2491
(a - b) / 2 != a - (b / 2); this is the reason why tunneled directory requests and client-side introduction circuits don't time out after the intended 30 seconds (task #847 ). Bugfix on r17106. Found by miner.
...
svn:r17189
2008-11-05 10:40:29 +00:00
Nick Mathewson
73c6cb8353
Fix unit test failure related to intro point parsing.
...
svn:r17188
2008-11-03 16:36:15 +00:00
Nick Mathewson
7b45d530b0
Add some debugging logs for bug 811/845.
...
svn:r17186
2008-11-03 15:46:05 +00:00
Roger Dingledine
ebe4ef12b9
when building preemptive circuits, ignore streams that have a
...
chosen exit node in mind already. otherwise we get tricked into
trying to build a new circuit that will handle them.
svn:r17184
2008-11-03 07:00:56 +00:00
Roger Dingledine
3e5a584d37
fix the other half of r17091. now that best_support can be -1,
...
we were complaining about no support for our one-hop streams,
when in fact choose_good_exit_server_general() has no business
caring about one-hop streams. patch from miner.
svn:r17181
2008-11-01 23:49:14 +00:00
Nick Mathewson
c534b96e58
Fix an assertion failure on double-marked circuits, and a double-mark.
...
svn:r17179
2008-11-01 20:27:41 +00:00
Nick Mathewson
0c9dfffe5a
Implement the 0x20-hack to make DNS poisoning harder against us, especially when resolving large names. Add a cfg option to disable it, since apparently 3/10 of a percent of servers get it wrong.
...
svn:r17171
2008-10-29 19:20:02 +00:00
Nick Mathewson
c8a5e2d588
Work better with tools that resist DNS poisoning by using the 0x20 hack: make DNSPort replies perserve case.
...
svn:r17170
2008-10-29 15:31:26 +00:00
Nick Mathewson
accb4a680f
make layer_hint check a little stricter.
...
svn:r17164
2008-10-27 16:57:18 +00:00
Nick Mathewson
ee31e0829e
Verify cpath_layer match on rendezvous cells too. Fixes another case of bug 446. Based on patch from rovv.
...
svn:r17162
2008-10-27 16:46:45 +00:00
Karsten Loesing
c53f1f83e7
gabelmoo has a new IP address.
...
svn:r17160
2008-10-27 15:04:45 +00:00
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
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
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
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
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
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
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
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
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
c33dde4ac1
Fix mingw build with --enable-gcc-warnings set.
...
svn:r16759
2008-09-04 21:58:09 +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
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
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
Nick Mathewson
32549ad95e
Double oops: revert accidentally committed local geoipc.c debugging hack.
...
svn:r16687
2008-08-29 17:02:26 +00:00
Nick Mathewson
730f1b6d3f
Oops. Make warn_too_many_conns() actually work.
...
svn:r16686
2008-08-29 17:01:15 +00:00
Nick Mathewson
6bf1dec945
Oops; set address families on nameservers.
...
svn:r16674
2008-08-27 14:12:10 +00:00
Nick Mathewson
2625eb204f
Fix a memory leak when freeing routerstatuses with exit policy summaries. Patch from mwenge.
...
svn:r16659
2008-08-25 23:19:58 +00:00
Roger Dingledine
c5fef3c57f
commit jake's patch to include strings with socks5 error numbers
...
svn:r16657
2008-08-25 21:02:22 +00:00
Roger Dingledine
8a9b6204ca
get rid of some magic constants i found while walking
...
jake through socks4 and socks5 failure codes
svn:r16651
2008-08-25 07:06:55 +00:00
Nick Mathewson
239cbe99ba
Oops. Linux has no sa_len field.
...
svn:r16627
2008-08-22 18:00:26 +00:00
Nick Mathewson
0800b332a0
r17847@tombo: nickm | 2008-08-22 12:08:56 -0400
...
ipv6: make server-side dns cache remember for each address an ipv6 addr and an ipv4 addr. This fix is just the struct side.
svn:r16622
2008-08-22 16:24:47 +00:00
Nick Mathewson
fc52d85b7c
r17846@tombo: nickm | 2008-08-22 11:54:00 -0400
...
Make dns resolver code more robust: handle nameservers with IPv6 addresses, make sure names in replies match requested names, make sure origin address of reply matches the address we asked.
svn:r16621
2008-08-22 16:24:43 +00:00
Roger Dingledine
8f5642edbc
Relays now reject risky extend cells: if the extend cell includes
...
a digest of all zeroes, or asks to extend back to the relay that
sent the extend cell, tear down the circuit. Ideas suggested
by rovv.
svn:r16605
2008-08-20 05:21:43 +00:00
Roger Dingledine
cc8b2247bf
make r16598 compile on 64-bit too
...
svn:r16604
2008-08-20 05:15:08 +00:00
Karsten Loesing
a8035b5fc3
Update doxygen documentation.
...
svn:r16599
2008-08-19 19:01:41 +00:00
Nick Mathewson
24f1d29be1
Apply proposal 121 patch 3, with minor tweaks and a few comments.
...
svn:r16598
2008-08-19 15:41:28 +00:00
Peter Palfrader
87a5962abb
All the controller things want their stuff in v2 format. Well then, maybe that's already sufficient
...
svn:r16578
2008-08-17 08:26:02 +00:00
Peter Palfrader
d3be2cb7fb
And tell us more in another error case
...
svn:r16577
2008-08-17 08:14:57 +00:00
Peter Palfrader
ab9078fca0
Change a warning/bug message
...
svn:r16576
2008-08-17 08:11:21 +00:00
Peter Palfrader
3c0b0ccca9
Two consensus fixes: always reset has_* to 0, and use a buffer of proper length for exitsummaries.
...
svn:r16575
2008-08-17 08:01:23 +00:00
Peter Palfrader
4eecd27b42
Make trunk build again under -DEXPORTMALLINFO
...
svn:r16559
2008-08-15 14:03:37 +00:00
Nick Mathewson
fcf817f897
Switch global_identifier on connections to a 64-bit field and move it to connection_t. When procession onionskins, look up the connection by this field rather than by addr:port. This will keep us from dropping onionskins. How many dropped circuits are dropped because of this bug?
...
svn:r16558
2008-08-15 13:55:01 +00:00
Peter Palfrader
521f8c791f
spaceman
...
svn:r16555
2008-08-14 23:09:48 +00:00
Peter Palfrader
8cc3d6e22d
Add exitpolicy summaries to the consensus
...
svn:r16554
2008-08-14 23:01:31 +00:00
Peter Palfrader
e27b448c57
Do not split stored exit policy summary into type(accept/reject) and portlist. At least not just yet
...
svn:r16553
2008-08-14 23:01:21 +00:00
Peter Palfrader
41730a893c
Rename a field so weasel likes it better
...
svn:r16552
2008-08-14 23:01:09 +00:00
Peter Palfrader
ceae7ed960
Add bw to consensus
...
svn:r16551
2008-08-14 23:00:57 +00:00
Peter Palfrader
82f8050ac4
Parse policies and weight (bw) into routerstatuses
...
svn:r16550
2008-08-14 23:00:44 +00:00
Peter Palfrader
e8de3ff54d
If we are lucky the whitespace nazis will not have noticed these things yet
...
svn:r16549
2008-08-14 18:01:20 +00:00
Peter Palfrader
fdba26f213
minor comment/doxygen fix
...
svn:r16548
2008-08-14 18:01:09 +00:00
Peter Palfrader
7c4106135a
Give bw in kb/sec in votes/consensus
...
svn:r16544
2008-08-14 12:37:59 +00:00
Peter Palfrader
ff32708d0e
Having a reject-all policy summarized with a lack of summary is stupid. Explicitly mention them as reject 1-65535.
...
svn:r16543
2008-08-14 12:37:50 +00:00
Peter Palfrader
2f91a3528a
testsuite: Now that we add (pretty useless, but still) routerinfos to the routerlist for every one of our routerstatuses in the votes we pass again. yay
...
svn:r16542
2008-08-14 12:37:42 +00:00
Peter Palfrader
6317cc2956
Only fetch the routerinfo_t in routerstatus_format_entry() if we are going to need it
...
svn:r16541
2008-08-14 12:37:34 +00:00
Peter Palfrader
a6ade97f67
Properly move forward char pointer after appending stuff to the string
...
svn:r16540
2008-08-14 12:37:28 +00:00
Peter Palfrader
056157984b
Disable test suite for today
...
svn:r16539
2008-08-14 12:37:21 +00:00
Peter Palfrader
b246c4de9b
asserting(s) is better than segfaulting if it turns out to be NULL later
...
svn:r16538
2008-08-14 12:37:14 +00:00
Peter Palfrader
1a2c6b41e3
Do not show policy and bw in v2 statuses
...
svn:r16537
2008-08-14 12:37:07 +00:00
Peter Palfrader
24da63ea7b
Add exit policy and bw to dirvotes - unfortunately also to v2 statuses
...
svn:r16536
2008-08-14 12:37:00 +00:00
Peter Palfrader
91f654f2ff
This bunch of functions really should be static
...
svn:r16535
2008-08-14 11:24:03 +00:00
Peter Palfrader
171a7d4b0f
Fix an overflow when counting rejects for *, truncate exit summaries after 1000 chars
...
svn:r16530
2008-08-13 19:25:18 +00:00
Peter Palfrader
adcea0f332
Think of the poor children in Antarctica who still have to work on 4" screens
...
svn:r16528
2008-08-13 12:46:13 +00:00
Peter Palfrader
0d807068a3
A few testcases for policy summaries
...
svn:r16527
2008-08-13 12:46:06 +00:00
Peter Palfrader
c4e8fe11db
Also special case "accept 1-65535" case, do not leak in non-exit case
...
svn:r16526
2008-08-13 12:46:00 +00:00
Peter Palfrader
8ef2fe4b37
Return NULL for policies that do not allow any exits
...
svn:r16525
2008-08-13 12:45:53 +00:00
Peter Palfrader
4a74b9a7df
Fix condition statement for accept items, fix two asserts
...
svn:r16524
2008-08-13 12:45:44 +00:00
Peter Palfrader
34e083dde1
Make sure we don't run off the end of the list
...
svn:r16523
2008-08-13 12:45:34 +00:00
Peter Palfrader
b2344a9e4d
Move policy_summarize() prototype to or.h
...
svn:r16522
2008-08-13 12:45:28 +00:00
Peter Palfrader
49a616e0fa
Create string representation of exit summaries
...
svn:r16521
2008-08-13 12:45:23 +00:00
Peter Palfrader
7eaf5bd848
Nickm says I'm going to hell, but if I write that in a comment he might just save my soul
...
svn:r16520
2008-08-13 12:45:15 +00:00
Peter Palfrader
1adc12546e
implement policy_summary_accept and policy_summary_reject together with a set of helpers
...
svn:r16519
2008-08-13 12:45:09 +00:00
Peter Palfrader
f5adde1a17
Start with exit policy summaries
...
svn:r16518
2008-08-13 12:45:01 +00:00
Nick Mathewson
97245376d9
Next patch from Karsten: client-side configuration stuff for proposal 121.
...
svn:r16510
2008-08-12 16:12:26 +00:00
Nick Mathewson
30422b5df1
Rate-limit "too-many-sockets" messages; they can get needlessly verbose.
...
svn:r16480
2008-08-09 15:35:37 +00:00
Nick Mathewson
60a0ae198d
Patch cleanups from karsten
...
svn:r16479
2008-08-09 15:13:28 +00:00
Nick Mathewson
7994f49d43
Fix bug in my changes to karsten's patch
...
svn:r16477
2008-08-08 16:45:22 +00:00
Nick Mathewson
a8ddac96d8
handle ipv6 in socks5 requests.
...
svn:r16476
2008-08-08 16:41:59 +00:00
Nick Mathewson
22259a0877
The first of Karsten's proposal 121 patches: configure and maintain client authorization data. Tweaked a bit: see comments on or-dev.
...
svn:r16475
2008-08-08 14:36:11 +00:00
Nick Mathewson
f6879caa04
Try once again to make BSD compilation happy.
...
svn:r16474
2008-08-08 12:58:17 +00:00
Nick Mathewson
39f88641c1
r17692@tombo: nickm | 2008-08-07 22:41:26 -0400
...
Fix more compile errors on BSD pf stuff. How about now?
svn:r16472
2008-08-08 02:41:34 +00:00
Nick Mathewson
5ab6fe0051
r17680@tombo: nickm | 2008-08-07 16:06:30 -0400
...
Add a missing safe_str for a debug_log_message. Fix the bad part of bug 674.
svn:r16462
2008-08-07 20:06:40 +00:00
Nick Mathewson
b81d70addb
Oops. On recent linux kernels we were not detecting the linux/netfilter_ipv4.h header properly, since we needed to have in_addr and in6_addr and __u32 defined before trying to include it. Fix that.
...
svn:r16460
2008-08-07 19:39:52 +00:00
Nick Mathewson
48848537bc
r17667@tombo: nickm | 2008-08-07 15:13:30 -0400
...
Make the TransPort input code handle IPv6 addresses, I hope. This code may not compile. Possibly fix bug 796.
svn:r16459
2008-08-07 19:13:39 +00:00
Nick Mathewson
d9601c65e0
r17666@tombo: nickm | 2008-08-07 15:12:30 -0400
...
Make tor_addr_from_sockaddr also give away the port in a useful format
svn:r16458
2008-08-07 19:13:35 +00:00
Nick Mathewson
635f3c8aee
r17664@tombo: nickm | 2008-08-06 12:32:09 -0400
...
Patch from Christopher Davis: open /dev/pf before dropping privileges. Fixes bug 782. Backport candidate.
svn:r16450
2008-08-06 16:32:17 +00:00
Nick Mathewson
9855c1d06f
r17645@31-33-44: nickm | 2008-08-05 16:28:01 -0400
...
Make unspecified addresses also cause connection_is_rate_limited to say 0.
svn:r16437
2008-08-05 20:28:03 +00:00
Nick Mathewson
960a0f0a99
r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
...
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types. Most of the Tor wire formats using these new types are in, but the code to generate and use it is not. This is a big patch. Let me know what it breaks for you.
svn:r16435
2008-08-05 20:08:19 +00:00
Peter Palfrader
0cfb68454e
Document that we break ties in favor of smaller SD digest if there are still ties after comparing the published timestamp
...
svn:r16432
2008-08-05 18:54:23 +00:00
Roger Dingledine
d01813a8dd
Take out the TestVia config option, since it was a workaround for
...
a bug that was fixed in Tor 0.1.1.21.
svn:r16409
2008-08-05 00:12:05 +00:00
Roger Dingledine
d5bb361977
minor fixes
...
svn:r16407
2008-08-04 23:59:38 +00:00
Karsten Loesing
d166b9dc45
Make check-spaces happy.
...
svn:r16406
2008-08-04 23:39:07 +00:00
Roger Dingledine
2a417700b4
don't log-warn on a bootstrapping status event if the recommendation
...
is to ignore.
svn:r16405
2008-08-04 23:38:32 +00:00
Karsten Loesing
1fe07f66f4
In some edge cases it occurs that the router descriptor of a previously picked introduction point becomes obsolete. In that case, don't stick to using that introduction point, but simply give up on it. Reverts some part of r15825.
...
svn:r16404
2008-08-04 23:35:12 +00:00
Karsten Loesing
ff9c3c006f
Remove dead code that was left from marking HiddenService(Exclude)Nodes obsolete in task 754.
...
svn:r16401
2008-08-04 22:42:27 +00:00
Karsten Loesing
3c9cd463d2
Fix a false assertion when extending a circuit to a relay to which a connection is already established. In that case the circuit should not need to memorize extend info for that relay. circuitbuild.c:389 contains a similar assertion.
...
svn:r16375
2008-08-03 17:45:24 +00:00
Karsten Loesing
ee44eadf4c
Fix a bug when generating router descriptors: The address part of exit policies was uninitialized.
...
svn:r16372
2008-08-03 12:43:18 +00:00
Roger Dingledine
fd4a30d198
bump to 0.2.1.3-alpha
...
svn:r16369
2008-08-03 05:35:42 +00:00
Roger Dingledine
bf066be654
note a feature (bugfix) we should do one day
...
svn:r16368
2008-08-03 05:35:18 +00:00
Nick Mathewson
1a76cd179a
When a struct ends with char a[1], the size of all earlier members of the struct is _not_ sizeof(st)-1; compilers add alignment. Problem spotted by rovv. Backport candidate.
...
svn:r16302
2008-07-31 12:18:14 +00:00
Nick Mathewson
186097906d
r17436@tombo: nickm | 2008-07-30 09:03:19 -0400
...
Move n_addr, n_port, and n_conn_id_digest fields of circuit_t into a separately allocated extend_info_t. Saves 22 bytes per connected circuit_t on 32-bit platforms, and makes me more comfortable with using tor_addr_t in place of uint32_t n_addr.
svn:r16257
2008-07-30 13:04:32 +00:00
Nick Mathewson
507b01357a
r17426@tombo: nickm | 2008-07-28 20:34:03 -0400
...
More test coverage for tor_addr_t; fix a couple of bugs.
svn:r16234
2008-07-29 00:34:50 +00:00