Commit Graph

7150 Commits

Author SHA1 Message Date
Steven Murdoch
43145fc9f5 In tor-resolve, when the Tor client to use is specified by <hostname>:<port>, actually use the specified port rather than defaulting to 9050
svn:r18833
2009-03-10 00:52:45 +00:00
Roger Dingledine
4774e593b8 Bugfix on r17756:
Avoid trying to print raw memory to the logs when we decide to
give up on downloading a given relay descriptor. Bugfix on
0.2.1.9-alpha.


svn:r18831
2009-03-09 22:05:17 +00:00
Roger Dingledine
7ee8afe82d bump to 0.2.1.13-alpha-dev
svn:r18830
2009-03-09 21:43:31 +00:00
Nick Mathewson
d40cbda2cd Log cached-at-exit exit policies to try to fix bug 672.
svn:r18827
2009-03-09 15:53:37 +00:00
Roger Dingledine
2f69c67957 doxygen tweak
svn:r18818
2009-03-09 06:20:15 +00:00
Roger Dingledine
e80ee33857 bump to 0.2.1.13-alpha
svn:r18814
2009-03-09 00:56:22 +00:00
Roger Dingledine
5d50bc3e1d We were already rejecting relay begin cells with destination port
of 0. Now also reject extend cells with destination port or address
of 0. Suggested by lark.


svn:r18812
2009-03-09 00:53:42 +00:00
Roger Dingledine
0f46c1dc6e Update to the "February 26 2009" ip-to-country file
svn:r18774
2009-03-05 10:47:25 +00:00
Nick Mathewson
cbbc0c9c86 Actually use tor_sscanf() to parse untrusted input.
svn:r18761
2009-03-03 18:02:36 +00:00
Nick Mathewson
26d83fc04c Add a simple locale-independent no-surprises sscanf replacement.
tor_sscanf() only handles %u and %s for now, which will make it
adequate to replace sscanf() for date/time/IP parsing.  We want this
to prevent attackers from constructing weirdly formed descriptors,
cells, addresses, HTTP responses, etc, that validate under some
locales but not others.

svn:r18760
2009-03-03 18:02:31 +00:00
Nick Mathewson
9f8d095e0f Add and use set/get_uint64 on onion tags. [bug 604; backportable]
It seems that 64-bit Sparc Solaris demands 64-bit-aligned access to
uint64_t, but does not 64-bit-align the stack-allocated char array we
use for cpuworker tags.  So this patch adds a set/get_uint64 pair, and
uses them to access the conn_id field in the tag.

svn:r18743
2009-03-02 19:15:05 +00:00
Nick Mathewson
27c3b43817 Fix one case of bug 929.
svn:r18683
2009-02-23 20:04:51 +00:00
Nick Mathewson
c7f3416a9e Add some debugging code to try to catch the likely cause of bug 929
svn:r18682
2009-02-23 18:57:21 +00:00
Nick Mathewson
261670b57e Patch from lark: if we get two extend cells for the same circuit id, drop the second. Previously, we had leaked an extend_info if the target connection was not open when the second arrived.
svn:r18668
2009-02-21 19:07:05 +00:00
Nick Mathewson
192b701fac Patch from lark: drop BEGIN cells from a rendevous circuit if they do not originate from the end of the circuit.
svn:r18667
2009-02-21 19:07:01 +00:00
Roger Dingledine
1b6688786c send the newconsensus event if the controller has asked for newconsensus
events, not if he's asked for ns events


svn:r18656
2009-02-20 10:25:08 +00:00
Nick Mathewson
b13496b62a Possible fix for broken country settings in ExcludeExitNodes.
It turns out that we weren't updating the _ExcludeExitNodesUnion set's
country numbers when we reloaded (or first loaded!) the IP-to-country
file.  Spotted by Lark.  Bugfix on 0.2.1.6-alpha.

svn:r18575
2009-02-16 15:15:06 +00:00
Roger Dingledine
d3289c6b87 docdoc and changelog for r18556
svn:r18566
2009-02-16 10:39:10 +00:00
Roger Dingledine
d13cc5f989 and list the new event here too
svn:r18557
2009-02-16 06:18:44 +00:00
Roger Dingledine
9ded433abb new controller event NEWCONSENSUS that lists the networkstatus
lines for every recommended relay.

still needs docdoc and changelog entry.


svn:r18556
2009-02-16 06:18:03 +00:00
Roger Dingledine
c8474f9d93 If the controller claimed responsibility for a stream, but that
stream never finished making its connection, it would live
forever in circuit_wait state. Now we close it after SocksTimeout
seconds. Bugfix on 0.1.2.7-alpha; reported by Mike Perry.


svn:r18516
2009-02-13 04:11:14 +00:00
Roger Dingledine
b03f78e8af Update to the "January 23 2009" ip-to-country file
svn:r18503
2009-02-12 12:32:14 +00:00
Nick Mathewson
65dc835773 Revert an erroneous part of the non-fix to bug 326, and add comments to explain why it was erroneous.
svn:r18494
2009-02-11 17:23:11 +00:00
Nick Mathewson
6e4afe6f13 I worry that the CLEAR() macro in eventdns.c is hiding bugs. That is sad, because it was meant to make them more detectable. Change it to change stuff to garbage rather than to 0. If no bugs turn up, we can remove it in 0.2.2.x
svn:r18493
2009-02-11 17:22:34 +00:00
Nick Mathewson
8d9aadf57c Port some mostly cosmetic eventdns changes from libevent
svn:r18492
2009-02-11 17:22:29 +00:00
Nick Mathewson
356b40f58b Clients and non-caches do not need to cache unrecognized authority certificates.
svn:r18480
2009-02-10 20:28:30 +00:00
Nick Mathewson
009752823a Enhance tor-checkkey tool so it can generate key hashes too.
svn:r18478
2009-02-10 20:03:58 +00:00
Karsten Loesing
34b285b09f As an exit node, scrub the IP address to which we are exiting in the logs. Bugfix on 0.2.1.8-alpha.
svn:r18477
2009-02-10 18:52:47 +00:00
Nick Mathewson
91fece7be2 Don't extend introduction circuits indefinitely.
Doing so could run you out of relay_early cells and give you a
senselessly long circuit.  Patch from Karsten; may fix bug 878.

svn:r18459
2009-02-10 00:45:30 +00:00
Nick Mathewson
6f90f6f2a2 Retry circuits if the exit node is optional and nonexistant.
Previously, when we had the chosen_exit set but marked optional, and
we failed because we couldn't find an onion key for it, we'd just give
up on the circuit.  But what we really want to do is try again, without
the forced exit node.

Spotted by rovv.  Another case of bug 752.  I think this might be
unreachable in our current code, but proposal 158 could change that.

svn:r18451
2009-02-09 16:55:48 +00:00
Nick Mathewson
c7315e65ae Disable KQUEUE from inside Tor if the OSX version is prior to 10.4.0
svn:r18450
2009-02-09 16:07:02 +00:00
Nick Mathewson
f99098cca4 Use prctl to reenable core dumps when we have setuid to a non-root user.
svn:r18449
2009-02-09 15:20:17 +00:00
Nick Mathewson
f95ab83792 Bump version to 0.2.1.12-alpha-dev
svn:r18448
2009-02-09 15:09:51 +00:00
Roger Dingledine
ad8e4924bd bump to 0.2.1.12-alpha
svn:r18429
2009-02-09 03:28:59 +00:00
Roger Dingledine
28d97f8262 uh, and commit the patch too.
svn:r18423
2009-02-09 03:13:14 +00:00
Nick Mathewson
fe987d3a17 Remove some deadcode and use tor_inet_aton uniformly.
svn:r18422
2009-02-09 03:13:05 +00:00
Nick Mathewson
2ebdf91a52 Fix a remote-crash bug. This will need a patch release.
svn:r18421
2009-02-09 03:13:02 +00:00
Roger Dingledine
3845087b04 decide that mikeperry's bug should be fixed in 0.2.1.x
(but not in 0.2.1.12-alpha, sorry)


svn:r18417
2009-02-09 02:50:19 +00:00
Roger Dingledine
decdf4537a If we're using bridges and our network goes away, be more willing
to forgive our bridges and try again when we get an application
request. Bugfix on 0.2.0.x.


svn:r18396
2009-02-04 23:27:35 +00:00
Roger Dingledine
45aeabf8f7 make a note about a clause in connection_edge.c that is probably
redundant, and is definitely confusing. we should take it out
in 0.2.2.x and see who squeaks.


svn:r18383
2009-02-04 08:27:36 +00:00
Nick Mathewson
261f49fe26 Fix a possible cause of bug 915 when parsing multiple votes one of which was bad. Bugfix on 0.2.0.8-alpha.
svn:r18354
2009-01-31 18:27:38 +00:00
Roger Dingledine
ec9c059757 give torrc.sample its yearly overhaul. the main change is to
merge the 'bridge relay' section into the 'main relay'
section, so people stop getting confused about whether they
should fill out both sections (they shouldn't).


svn:r18348
2009-01-30 19:37:59 +00:00
Nick Mathewson
0f2e171653 fix a wide line.
svn:r18341
2009-01-30 15:23:44 +00:00
Nick Mathewson
e1f03572ca Support setting serverdnsrandomizecase during sighup. Backportable, unless too trivial.
svn:r18307
2009-01-28 19:53:03 +00:00
Nick Mathewson
f78793879d Fix a race condition on nameserver reconfiguration.
This resolves bug 526, wherein we would crash if the following
events occurred in this order:
  A: We're an OR, and one of our nameservers goes down.
  B: We launch a probe to it to see if it's up again. (We do this hourly
     in steady-state.)
  C: Before the probe finishes, we reconfigure our nameservers,
     usually because we got a SIGHUP and the resolve.conf file changed.
  D: The probe reply comes back, or times out. (There is a five-second
     window for this, after B has happens).

IOW, if one of our nameservers is down and our nameserver
configuration has changed, there were 5 seconds per hour where HUPing
the server was unsafe.

Bugfix on 0.1.2.1-alpha.  Too obscure to backport.

svn:r18306
2009-01-28 18:26:20 +00:00
Nick Mathewson
e06de61d84 Don't obsolete a very-new connection for having no circuits yet.
This fixes the last known case of bug 891, which could happen if two
hosts, A and B, disagree about how long a circuit has been open,
because of clock drift of some kind.  Host A would then mark the
connection as is_bad_for_new_circs when it got too old and open a new
connection.  In between when B receives a NETINFO cell on the new
conn, and when B receives a conn cell on the new circuit, the new
circuit will seem worse to B than the old one, and so B will mark it
as is_bad_for_new_circs in the second or third loop of
connection_or_group_set_badness().

Bugfix on 0.1.1.13-alpha.  Bug found by rovv.

Not a backport candidate: the bug is too obscure and the fix too tricky.

svn:r18303
2009-01-28 17:36:41 +00:00
Nick Mathewson
0d5f4d4e73 Remove some dead code.
svn:r18301
2009-01-28 17:36:34 +00:00
Nick Mathewson
8027c8c6dd Forward-port: Fix bug 893: check AP connections for markedness before expiring them.
svn:r18299
2009-01-28 16:30:06 +00:00
Nick Mathewson
ef001cf85d Actually send the extra_headers content in write_http_response_header_impl. This make X-Descriptor-Now-New get sent. Bugfix on 0.2.0.10-alpha. Spotted by "multiplication".
svn:r18297
2009-01-28 16:06:46 +00:00
Roger Dingledine
9fdae765e3 clean up r18287
svn:r18288
2009-01-28 07:16:22 +00:00