Commit Graph

1890 Commits

Author SHA1 Message Date
Nick Mathewson
7607ad2bec Detect openssl header version doesn't match runtime version
We already do this for libevent; let's do it for openssl too.

For now, I'm making it always a warn, since this has caused some
problems in the past.  Later, we can see about making it less severe.
2012-09-06 11:31:30 -04:00
Nick Mathewson
e3a130a7eb Don't log about Libevent/OpenSSL initialization when all's well
OTOH, log the Libevent and OpenSSL versions on the first line when
we're starting Tor.
2012-09-06 11:31:22 -04:00
Nick Mathewson
ad1e8b45df Merge branch 'bug6778' 2012-09-06 11:05:16 -04:00
Nick Mathewson
30fe9080e7 Fix a dependency: micro-revision.i influences tor_main.o, not tor_main.c 2012-09-06 11:00:32 -04:00
Nick Mathewson
e9684405ac Merge remote-tracking branch 'asn/bug4567_rebased' 2012-09-06 10:12:28 -04:00
Nick Mathewson
5d162d5a7b Fix a dependency: sha256.c influences crypto.o, not crypto.c 2012-09-06 10:03:06 -04:00
Nick Mathewson
91fed2c703 Fix a build-warning when building out-of-tree
We were trying to incorporate all headers in common_sha1.i, not just
the src/common ones.

This is part of bug 6778; fix on 0.2.4.1-alpha
2012-09-06 09:56:48 -04:00
Nick Mathewson
5d679caa32 Fix warning when implicitly casting strlen(microdesc) to int
Harmless unless we somehow generate a microdesc of more than INT_MAX
bytes.
2012-09-05 20:49:25 -04:00
Roger Dingledine
325f33047a and fold it into master too 2012-09-05 17:23:08 -04:00
Nick Mathewson
f8c1ab7bbf Merge remote-tracking branch 'origin/maint-0.2.3' 2012-09-05 16:25:13 -04:00
Nick Mathewson
9d9ca264ec Avoid segfault if EntryGuardPathBias precedes EntryGuard
Fix for bug 6774; bugfix on 0.2.3.17-beta.
2012-09-05 13:27:54 -04:00
George Kadianakis
44fe717524 General tweaks and fixes for Nick's comments.
* Add changes/ files.
* Edit the tor-fw-helper manpage.
* Fix check-spaces.
* Add prototype for get_list_of_ports_to_forward().
* Fix tor_parse_long() TCP port range.
* Improve doc. of tor_check_port_forwarding().
* Check for overflows in tor_check_port_forwarding().
* Demote successful port forwarding to LOG_INFO.

Conflicts:
	src/common/address.c
	src/or/circuitbuild.c
2012-09-05 18:23:28 +03:00
Roger Dingledine
c77d1b7bda fold in the changes files
in-progress due to various bugs i uncovered in the ipv6 config option
meanings.
2012-09-05 04:46:44 -04:00
Roger Dingledine
de6a538b9c one more already-merged changes file 2012-09-04 20:23:46 -04:00
Roger Dingledine
031da8dd34 remove the changes files that are merged into 0.2.3.21-rc 2012-09-04 20:11:19 -04:00
Nick Mathewson
4d87919ba6 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-09-04 18:34:39 -04:00
Nick Mathewson
d7a646edcf Merge branch 'bug5535_only_rebased' 2012-09-04 18:24:20 -04:00
Linus Nordberg
e04e1a2e7d Clients connect to public relays over IPv6.
Add ClientUseIPv6 and ClientPreferIPv6ORPort configuration options.

Use "preferred OR port" for all entry nodes, not only for bridges.

Mark bridges with "prefer IPv6 OR port" if an IPv6 address is
configured in Bridge line and ClientPreferIPv6ORPort is set.

Mark relays with "prefer IPv6 OR port" if an IPv6 address is found in
descriptor and ClientPreferIPv6ORPort is set.

Filter "preferred OR port" through the ClientUseIPv6 config option. We
might want to move this test to where actual connection is being set
up once we have a fall back mechanism in place.

Have only non-servers pick an IPv6 address for the first hop: We
don't want relays to connect over IPv6 yet. (IPv6 has never been used
for second or third hops.)

Implements ticket 5535.
2012-09-04 12:57:21 -04:00
Linus Nordberg
156ffef249 Have directory authorities vote on IPv6 OR ports according to the spec
Define new new consensus method 14 adding "a" lines to vote and
consensus documents.

From proposal 186:

  As with other data in the vote derived from the descriptor, the
  consensus will include whichever set of "a" lines are given by the
  most authorities who voted for the descriptor digest that will be
  used for the router.

This patch implements this.
2012-09-04 11:52:22 -04:00
Nick Mathewson
05ded76cb6 Merge remote-tracking branch 'arma/bug6759' 2012-09-04 10:18:51 -04:00
Nick Mathewson
3da9a14f1c Merge remote-tracking branch 'arma/feature6758' 2012-09-04 10:16:15 -04:00
Roger Dingledine
3ea37e5faa quiet "I learned some more directory information" on startup
Reserve it for when new directory information arrives in response to
a fetch.

Resolves ticket 6760.
2012-09-03 19:49:44 -04:00
Roger Dingledine
2131cc125b Don't log about reloading the microdescriptor cache at startup
Addresses bug 6759.
2012-09-03 18:50:27 -04:00
Roger Dingledine
e964f81143 omit the first heartbeat message (resolves ticket 6758) 2012-09-03 18:13:35 -04:00
Roger Dingledine
eb3d079667 Make begindir_cutoff the same as general_cutoff
Allow one-hop directory fetching circuits the full "circuit build timeout"
period, rather than just half of it, before failing them and marking
the relay down. This fix should help reduce cases where clients declare
relays (or worse, bridges) unreachable because the TLS handshake takes
a few seconds to complete.

Fixes bug 6743 (one piece of bug 3443); bugfix on 0.2.2.2-alpha, where
we changed the timeout from a static 30 seconds.
2012-09-01 01:25:17 -04:00
Nick Mathewson
48a6816eb5 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-31 18:39:27 -04:00
Nick Mathewson
b17bb543da Merge branch 'bug6732' into maint-0.2.3 2012-08-31 18:39:11 -04:00
Nick Mathewson
65a65edd6b Remove changes files which have been removed in release-0.2.3 2012-08-31 18:37:56 -04:00
Nick Mathewson
774979ca45 Document consensus and microdesc files
Bugfix for #6732.
2012-08-31 11:35:47 -04:00
Nick Mathewson
3363a0d26e Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-27 16:39:30 -04:00
Nick Mathewson
a7a4bbff47 Quiet "Set buildtimeout to low val" warnings: make them info
Fix for #6251
2012-08-27 16:37:09 -04:00
Nick Mathewson
f40378118c Merge remote-tracking branch 'mikeperry/bug6647' 2012-08-27 16:23:19 -04:00
Nick Mathewson
b252ffa7cb Downgrade path-bias warning messages to INFO for now.
We've had over two months to fix them, and didn't.  Now we need
0.2.3.x stable.  Yes, it would be cool to get this working in
0.2.3.x, but not at the expense of delaying every other feature that
_does_ work in 0.2.3.x.  We can do a real fix in 0.2.4.
2012-08-27 16:18:35 -04:00
Nick Mathewson
0c5a44ed0a Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-27 16:16:27 -04:00
Nick Mathewson
bffe0d3ccc Merge branch 'bug6710_023' into maint-0.2.3 2012-08-27 16:15:01 -04:00
Nick Mathewson
e232938ec8 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-27 16:09:29 -04:00
Nick Mathewson
443e4ae1ee Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
Conflicts:
	src/or/policies.c
2012-08-27 16:07:04 -04:00
Roger Dingledine
0ccd57f0f2 and fix them here too 2012-08-27 14:28:00 -04:00
Mike Perry
0c13547ea9 Bug 6647: Add changes file 2012-08-27 11:15:35 -07:00
Nick Mathewson
45b520b6a4 Fix changes file for 6710: before 0.0.8pre1, you couldn't extend to
a router that another router wasn't already connected to.
2012-08-27 12:29:04 -04:00
Nick Mathewson
62d96284f7 Do not assert when comparing a null address/port against a policy
This can create a remote crash opportunity for/against directory
authorities.
2012-08-27 12:04:55 -04:00
Nick Mathewson
b7c172c9ec Disable extending to private/internal addresses by default
This is important, since otherwise an attacker can use timing info
to probe the internal network.

Also, add an option (ExtendAllowPrivateAddresses) so that
TestingTorNetwork won't break.

Fix for bug 6710; bugfix on all released versions of Tor.
2012-08-27 11:19:29 -04:00
Nick Mathewson
7795f42e4b Merge branch 'bug6524_nm' 2012-08-27 10:33:24 -04:00
Nick Mathewson
09d90b1b65 Changes file for nonrecursive make branch 2012-08-27 10:28:45 -04:00
Nick Mathewson
b3b4f31936 Merge remote-tracking branch 'linus/bug6364' 2012-08-27 09:53:37 -04:00
Nick Mathewson
6f7dbd3d34 Merge remote-tracking branch 'linus/bug6362' 2012-08-27 09:50:22 -04:00
Nick Mathewson
6864a44a4a Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-24 12:51:50 -04:00
Nick Mathewson
ce4add498f Merge remote-tracking branch 'public/bug6472' into maint-0.2.3 2012-08-24 12:51:02 -04:00
Linus Nordberg
3410a46ebc Move ipv6_preferred from routerinfo_t to node_t.
Move extend_info_from_router() from circuitbuild.c to router.c and
make it static.

Add get_configured_bridge_by_orports_digest() and have
get_configured_bridge_by_routerinfo() and
node_is_a_configured_bridge() use it. We now consider all OR ports of
a bridge when looking for it.

Move node_get_*_orport to nodelist.c.

Fix a cut'n'paste error in header of nodelist.h.

Add node_assert_ok().

Add router_get_all_orports(). It's duplicating code from
node_get_all_orports(). Worth fixing at the cost of complicating the
API slightly?
2012-08-23 22:13:12 +02:00
Peter Palfrader
5b0ed1e344 Remove #6480 fix from 0.2.2.38 changelog - it was not included
(Forward-port from release-0.2.2 to master)
2012-08-22 12:36:08 -04:00
Nick Mathewson
939d01f0ba Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-21 10:36:51 -04:00
Nick Mathewson
991a8acba2 Merge remote-tracking branch 'public/bug6404' into maint-0.2.3 2012-08-21 10:35:40 -04:00
Linus Nordberg
9216e2819b Send IPv6 address in NETINFO cells.
Closes #6364.
2012-08-20 17:01:18 +02:00
Linus Nordberg
5671586dc7 Make all relays, not only bridges, capable of advertising an IPv6 OR port.
Closes #6362.
2012-08-19 14:48:22 +02:00
Nick Mathewson
223e7cfabe When iterating over connections pending DNS, skip marked ones
Failure to do this would lead to double-free cases and similar,
especially when the exit's DNS was broken. See bug 6472 for full
details; this is a fix for 6472.

Anonymous patch from "cypherpunks" on trac.
2012-08-17 16:46:11 -04:00
Nick Mathewson
1c64f99a1a Merge remote-tracking branch 'public/bug5124' 2012-08-17 16:05:09 -04:00
Nick Mathewson
d9746bd468 Remove needless flush-on-write code.
Long ago, before we had cell queues, it was necessary to maybe call
connection_handle_write() from connectino_write_to_buf_impl() on OR
connections, so that we wouldn't get into a loop of reading infinite
amounts of data and queueing it all on an outbuf before bothering to
write any data.

If that doesn't sounds like what our code does now, you're right:
right now, we won't stick more than OR_CONN_HIGHWATER bytes of cells
on an outbuf, and we won't suck more than CELL_QUEUE_HIGHWATER_SIZE
cells off any edge connection. So, there's no more call for that
code.

Removing this code will simplify our data flow, and that should be
something we can all get behind.
2012-08-17 16:01:30 -04:00
Nick Mathewson
a9d56289ee Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-17 15:59:40 -04:00
Linus Nordberg
9ed87b37d0 Consider IPv6 OR ports when deciding whether a routerinfo change is cosmetic.
Closes #6423.
2012-08-17 15:59:13 -04:00
Nick Mathewson
851197f11d Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-17 14:04:28 -04:00
Nick Mathewson
97602c9de4 Merge branch 'bug6379' into maint-0.2.3 2012-08-17 13:57:07 -04:00
Nick Mathewson
eec86939d1 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-17 12:39:31 -04:00
Nick Mathewson
e9172e51fb Merge remote-tracking branch 'public/bug6244_part_c' into maint-0.2.3 2012-08-17 12:37:49 -04:00
Nick Mathewson
1728801bbc Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-17 12:34:52 -04:00
Nick Mathewson
676f71054f Merge remote-tracking branch 'public/bug6507' into maint-0.2.3 2012-08-17 12:33:17 -04:00
Nick Mathewson
a4669d8704 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-17 12:10:44 -04:00
Nick Mathewson
3621f30ad4 Merge remote-tracking branch 'mikeperry/bug6475' into maint-0.2.3 2012-08-17 12:08:42 -04:00
Nick Mathewson
274e281741 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-17 11:54:05 -04:00
Nick Mathewson
f25e8d034b Merge remote-tracking branch 'public/bug6514' into maint-0.2.3 2012-08-17 11:53:06 -04:00
Mike Perry
4e42a8a2f2 Address Nick's comments from code review.
Also promote log messages to notice and rate-limit them.
2012-08-16 16:29:19 -07:00
Nick Mathewson
6a33c33a12 Fix warnings and 64-bit problems in openbsd-malloc code
The warning fixes are:
  - Only define issetugid if it's missing.
  - Explicitly ignore the return value of writev.
  - Explicitly cast the retval of readlink() to int.

The 64-bit problems are related to just storing a size_t in an int. Not cool!  Use a size_t instead.

Fix for bug 6379. Bugfix on 0.2.0.20-rc, which introduced openbsd-malloc.
2012-08-15 19:26:53 -04:00
Nick Mathewson
2ba52f4095 Fix wildcarded address mappings from the control port
Apparently, we weren't actually detecting wildcardedness when parsing
them: whoops!

bug 6244.  Bugfix on 0.2.3.9-alpha
2012-08-15 17:59:30 -04:00
Nick Mathewson
cdd882ee71 Check for stream_id, not conn, on extend cells.
Extend cells aren't allowed to have a stream_id, but we were only
blocking them when they had a stream_id that corresponded to a
connection.  As far as I can tell, this change is harmless: it will
make some kinds of broken clients not work any more, but afaik nobody
actually make a client that was broken in that way.

Found while hunting for other places where we made the same mistake
as in 6271.

Bugfix on d7f50337c1 back from May 2003, which introduced
telescoping circuit construction into 0.0.2pre8.
2012-08-15 13:16:41 -04:00
Nick Mathewson
a4fbfa81b3 Update description of what we did to upper limit on md size
Spotted by asn
2012-08-14 03:10:14 -04:00
Nick Mathewson
c9d3e09cf8 Clarify the last changes message 2012-08-13 14:50:29 -04:00
Nick Mathewson
182f463be9 oops: changes file for f45cde05f9 2012-08-13 14:37:53 -04:00
Nick Mathewson
d993b04485 Reject attempts to say FooPort and FooPort 0 in the same cfg domain 2012-08-09 16:13:03 -04:00
Nick Mathewson
dfe03d36c8 Don't infer we have a FooPort from the presence of a FooPort line
Thanks to the changes we started making with SocksPort and friends
in 0.2.3.3-alpha, any of our code that did "if (options->Sockport)"
became wrong, since "SocksPort 0" would make that test true whereas
using the default SocksPort value would make it false.  (We didn't
actually do "if (options->SockPort)" but we did have tests for
TransPort.  When we moved DirPort, ORPort, and ControlPort over to
the same system in 0.2.3.9-alpha, the problem got worse, since our
code is littered with checks for DirPort and ORPort as booleans.

This code renames the current linelist-based FooPort options to
FooPort_lines, and adds new FooPort_set options which get set at
parse-and-validate time on the or_options_t.  FooPort_set is true
iff we will actually try to open a listener of the given type. (I
renamed the FooPort options rather than leave them alone so that
every previous user of a FooPort would need to get inspected, and so
that any new code that forgetfully uses FooPort will need fail to
compile.)

Fix for bug 6507.
2012-08-09 15:48:43 -04:00
Nick Mathewson
07df4dd52d Refactor the core of choosing by weights into a function
This eliminates duplicated code, and lets us test a hairy piece of
functionality.
2012-08-09 14:15:58 -04:00
Nick Mathewson
640a51684c Remove remaining timing-dependency in choosing nodes by bandwidth
The old approach, because of its "tmp >= rand_bw &&
!i_has_been_chosen" check, would run through the second part of the
loop slightly slower than the first part.  Now, we remove
i_has_been_chosen, and instead set rand_bw = UINT64_MAX, so that
every instance of the loop will do exactly the same amount of work
regardless of the initial value of rand_bw.

Fix for bug 6538.
2012-08-09 12:40:03 -04:00
Nick Mathewson
e106812a77 Change smartlist_choose_node_by_bandwidth to avoid double
This should make our preferred solution to #6538 easier to
implement, avoid a bunch of potential nastiness with excessive
int-vs-double math, and generally make the code there a little less
scary.

"But wait!" you say.  "Is it really safe to do this? Won't the
results come out differently?"

Yes, but not much.  We now round every weighted bandwidth to the
nearest byte before computing on it.  This will make every node that
had a fractional part of its weighted bandwidth before either
slighty more likely or slightly less likely.  Further, the rand_bw
value was only ever set with integer precision, so it can't
accurately sample routers with tiny fractional bandwidth values
anyway.  Finally, doing repeated double-vs-uint64 comparisons is
just plain sad; it will involve an implicit cast to double, which is
never a fun thing.
2012-08-09 12:21:37 -04:00
Nick Mathewson
0b21170085 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-09 10:52:45 -04:00
Nick Mathewson
91b52a259a Merge remote-tracking branch 'public/bug6252_again' into maint-0.2.3 2012-08-09 10:50:11 -04:00
Nick Mathewson
aa584fd3a3 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-03 12:04:36 -04:00
Nick Mathewson
93be3a8822 Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
Conflicts:
	src/or/routerlist.c
2012-08-03 12:04:11 -04:00
Nick Mathewson
d48cebc5e4 Try to clarify impact of bug 6537
I don't personally agree that this is likely to be easy to exploit,
and some initial experimention I've done suggests that cache-miss
times are just plain too fast to get useful info out of when they're
mixed up with the rest of Tor's timing noise.  Nevertheless, I'm
leaving Robert's initial changelog entry in the git history so that he
can be the voice of reason if I'm wrong. :)
2012-08-03 11:54:11 -04:00
Robert Ransom
308f6dad20 Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix.
2012-08-03 11:49:51 -04:00
Nick Mathewson
babf8e2a85 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-08-03 11:23:06 -04:00
Nick Mathewson
1040afb242 Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3 2012-08-03 11:18:40 -04:00
Nick Mathewson
55f635745a Clarify security impact of bug 6530 2012-08-03 11:16:13 -04:00
Nick Mathewson
57e35ad3d9 Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha.
2012-08-03 10:53:00 -04:00
Stewart Smith
9572bebcda Enable the automake silent rules.
$ make V=1 # will temporarily disable them

otherwise you see:

   CC foo.c

rather than the giant long bulid line.

This makes it significantly easier to spot compiler warnings etc.

Additionally, make them conditional, so we won't error on automake <
1.11

(commits squashed by nickm.)
2012-08-02 10:04:13 -04:00
Nick Mathewson
2d6d5db2fe Defensive programming: clear rs_out between iterations.
I can't currently find a bug here, but there are a couple of
near-misses.  Addresses ticket 6514; reported pseudonymously on
IRC.
2012-08-01 17:25:34 -04:00
Nick Mathewson
c49975a2b8 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-31 17:20:36 -04:00
Nick Mathewson
62637fa224 Avoid hard (impossible?)-to-trigger double-free in dns_resolve()
Fixes 6480; fix on 0.2.0.1-alpha; based on pseudonymous patch.
2012-07-31 17:19:17 -04:00
Nick Mathewson
0e35e9235e new changes entry for rend_service_introduce refactoring 2012-07-31 17:09:20 -04:00
Andrea Shepard
8f63ef10ad Implement replaycache_t for bug 6177, and unit tests for the preceding 2012-07-31 17:08:05 -04:00
Nick Mathewson
43b81325b5 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-31 11:49:32 -04:00
Nick Mathewson
ae75fb13e1 changelog for bug6043 2012-07-31 11:49:20 -04:00
Nick Mathewson
063138e001 Warn at parse time for routerstatus entry missing a microdesc consensus
In 0.2.3.18-rc, we started warning on this case while building a
list of missing microdescriptor digests.  That turned out to spam
the logs; instead let's warn at parse time.

Partial fix for bug 6404.
2012-07-31 11:01:57 -04:00
Nick Mathewson
7143d112a6 Don't include a router in an md consensus if we can't find a md for it.
The spec requires that every router in a microdesc consensus have an
m line; we weren't obeying that spec.

This creates a new consensus method (13) to allow voting to continue
to work right. Partial fix for bug 6404; fix on 0.2.2.6-alpha.
2012-07-31 10:54:14 -04:00
Nick Mathewson
2503cfad24 Allow microdescs to be up to 2k. Partial fix for 6404. 2012-07-31 10:48:35 -04:00
Nick Mathewson
5919e8e561 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-31 10:29:34 -04:00
Nick Mathewson
aed93f8ad9 Merge branch 'bug6490_v2' into maint-0.2.3 2012-07-31 10:28:43 -04:00
Nick Mathewson
2bd45213c9 Warn when accounting is used in a way likely to link hidden services
Fix for 6490.
2012-07-31 10:28:16 -04:00
Nick Mathewson
e6d61ee594 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-31 10:18:05 -04:00
Nick Mathewson
d9bd0de062 Fix some manpage typos
This is based on a pair of patches from A. Costa. I couldn't apply
those directly, since they changed the generated *roff files, not
the asciidoc source.

Fixes Tor bug 6500 and Debian bug 683359.
2012-07-31 10:16:03 -04:00
Nick Mathewson
20b625a0fd Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-23 12:36:04 -04:00
Nick Mathewson
692005b38d Merge remote-tracking branch 'asn/bug6274_take3' into maint-0.2.3 2012-07-23 12:35:23 -04:00
Nick Mathewson
952f562691 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-23 12:31:24 -04:00
Nick Mathewson
6cf8e38eca changes file for bug 6436. 2012-07-20 09:50:19 -04:00
Linus Nordberg
fff842a47c Add config option AuthDirPublishIPv6.
Test for config option AuthDirPublishIPv6 == 1 rather than for running
as a bridge authority when deciding whether to care or not about IPv6
OR ports in descriptors.

Implements enhancement #6406.
2012-07-19 17:51:15 -04:00
Linus Nordberg
0fe6dde4b2 Add changes file for #5534. 2012-07-19 18:21:22 +02:00
Linus Nordberg
044da1bf0f Add configure option AuthDirHasIPv6Connectivity.
Implements enhancement 5974.
2012-07-19 18:21:22 +02:00
Linus Nordberg
631ec5c4fe Move last_reachable and testing_since from routerinfo_t to node_t. 2012-07-19 18:21:20 +02:00
George Kadianakis
a1d060a68f Better handling of server managed proxies when Tor is not a relay. 2012-07-18 20:01:02 +02:00
Nick Mathewson
5ade278605 Check ewma_enabled before doing circ-has-become-inactive check
This avoids a possible crash bug in flush_from_first_active_circuit.

Fixes bug 6341; bugfix on 0.2.2.7-alpha.

Bug reported and fixed by a pseudonymous user on IRC.
2012-07-18 10:28:55 -04:00
Nick Mathewson
393944dfb6 Have the bug6252 commit message reflect its on-again/off-again status 2012-07-18 10:24:17 -04:00
Roger Dingledine
c1bd104111 Detect bug 6252 (unexpected sendme cell)
I only check on circuits, not streams, since bloating your stream
window past the initial circuit window can't help you much.

Also, I compare to CIRCWINDOW_START_MAX so we don't have surprising
races if we lower CIRCWINDOW_START for an experiment.
2012-07-18 10:23:04 -04:00
Nick Mathewson
f8c9cc713d Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-18 10:14:40 -04:00
Nick Mathewson
b355ddb20f Merge branch 'smartlist_shorten' into maint-0.2.3 2012-07-18 10:14:14 -04:00
Nick Mathewson
78dec94307 Tweaks to 6400 changes file and docs as suggested by arma 2012-07-18 10:12:19 -04:00
Nick Mathewson
ec8bdc5da8 Merge remote-tracking branch 'asn/bug3589' 2012-07-17 12:05:08 -04:00
Nick Mathewson
f9478b7a79 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-17 12:03:10 -04:00
Nick Mathewson
4cac5df554 Improve message on spurious SOCKSListenAddress 2012-07-17 12:02:55 -04:00
Nick Mathewson
efdf6c7118 Fix the remaining instances of nexted SMARTLIST_FOREACH 2012-07-17 10:41:24 -04:00
Nick Mathewson
7faf115dff Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/END
The SMARTLIST_FOREACH macro is more convenient than BEGIN/END when
you have a nice short loop body, but using it for long bodies makes
your preprocessor tell the compiler that all the code is on the same
line.  That causes grief, since compiler warnings and debugger lines
will all refer to that one line.

So, here's a new style rule: SMARTLIST_FOREACH blocks need to be
short.
2012-07-17 10:34:08 -04:00
Nick Mathewson
0b6fb5ebcd Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-17 09:50:18 -04:00
Linus Nordberg
21c6c84853 Allow TestingTorNetwork when alternate dir and bridge authorities are set.
Allow TestingTorNetwork when AlternateDirAuthority and
AlternateBridgeAuthority is set even if DirServer is not.
2012-07-17 09:35:38 -04:00
Nick Mathewson
7ac8a4a037 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-16 11:50:53 -04:00
Nick Mathewson
93b7301755 Refer to the correct variable in a loop when parsing entry guard state
Fixes bug 6397 and coverity issue 709599. Bugfix on 0.2.3.17-beta.
2012-07-16 11:49:45 -04:00
Nick Mathewson
d32f5081e1 Coverity 709056: Check return value on fputs in tor-gencert 2012-07-16 11:38:39 -04:00
Nick Mathewson
deaf30a8af Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-16 11:22:41 -04:00
Nick Mathewson
9ad5b25930 Improve Alternate*Authority docs. Bug 6387. 2012-07-16 11:21:20 -04:00
George Kadianakis
8b9f4d75f2 Address Nick's comments.
- Add a changes/ file.
- Make it compile under --enable-gcc-warnings.
- Update the file-level documentation of src/or/transports.c.
- Only update descriptor if at least a managed proxy was configured.
- Add our external IP address to the extra-info descriptor instead of 0.0.0.0.
2012-07-12 15:28:43 +02:00
Roger Dingledine
6cad84503b Merge branch 'maint-0.2.3' 2012-07-06 16:32:08 -04:00
Roger Dingledine
5ddb9b3134 Merge branch 'maint-0.2.2' into maint-0.2.3 2012-07-06 16:31:40 -04:00
Roger Dingledine
4e7552e552 Revert to the May 2012 geoip db
The June 2012 db marks too many relays as country "A1".
Addresses bug 6334.
2012-07-06 16:29:51 -04:00
Roger Dingledine
1fee920999 Merge branch 'maint-0.2.3' 2012-07-06 08:59:26 -04:00
Roger Dingledine
27ec0248d2 Merge remote-tracking branch 'nickm/bug6271_part_a' into maint-0.2.3 2012-07-06 08:57:29 -04:00
Nick Mathewson
7e1a0bb24e Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-06 08:03:16 -04:00
George Kadianakis
62c1311b3a Fix port range in parse_port_range(). 2012-07-06 08:02:14 -04:00
Nick Mathewson
419f541aa7 Fix a bug handling SENDME cells on nonexistent streams.
This could result in bizarre window values. Report and patch
contributed pseudymously.  Fixes part of bug 6271. This bug was
introduced before the first Tor release, in svn commit r152.

(bug 6271, part a.)
2012-07-06 07:29:54 -04:00
Nick Mathewson
7e8d7a017e Merge remote-tracking branch 'origin/maint-0.2.3' 2012-07-05 05:08:54 -04:00
Nick Mathewson
e9b33ed1bf On windows, ENOBUFS starts with WSA. #6296. Fix on 0.2.18-rc 2012-07-05 05:01:00 -04:00
Roger Dingledine
46434ecf5b Merge branch 'maint-0.2.3' 2012-07-01 17:37:59 -04:00
Roger Dingledine
d13389b30e Revert "Detect bug 6252 (unexpected sendme cell)"
This reverts commit c32ec9c425.

It turns out the two sides of the circuit don't actually stay in sync,
so it is perfectly normal for the circuit window on the exit relay to
grow to 2000+. We should fix that bug and then reconsider this patch.
2012-07-01 17:36:35 -04:00
Roger Dingledine
6061cd584c Merge branch 'maint-0.2.3' 2012-07-01 05:32:37 -04:00
Roger Dingledine
c32ec9c425 Detect bug 6252 (unexpected sendme cell)
I only check on circuits, not streams, since bloating your stream
window past the initial circuit window can't help you much.

Also, I compare to CIRCWINDOW_START_MAX so we don't have surprising
races if we lower CIRCWINDOW_START for an experiment.
2012-07-01 05:27:08 -04:00
Nick Mathewson
19a81ef020 Merge commit '81cd3d7ad641a8dbf' 2012-06-28 15:52:57 -04:00
Nick Mathewson
e62ea8fd1e oops; forgot the changes file for bug3842 2012-06-28 15:48:49 -04:00
Nick Mathewson
e13e9c40c8 Never emit the "opt" prefix in any directory stuff
Fix for bug 5124.
2012-06-28 15:47:07 -04:00
meejah
12298901fd add new GETINFO config/defaults
returns the default values for every configuration item, similar
to GETINFO config/names; include a changes entry for it.

Fix for bug 4971
2012-06-28 15:15:51 -04:00
Roger Dingledine
36d8a2535e fold in more changes entries 2012-06-28 13:42:30 -04:00
Nick Mathewson
96746e39f6 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-28 10:57:23 -04:00
Nick Mathewson
217862b317 Merge remote-tracking branch 'public/bug6244_part2' into maint-0.2.3 2012-06-28 10:49:32 -04:00
Nick Mathewson
d4a64fdc02 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-28 10:48:06 -04:00
Nick Mathewson
dc9dd2324b Add version and bug number to 5238 changes file 2012-06-28 10:45:56 -04:00
Andrea Shepard
bdc8270280 Downgrade 'Got a certificate, but we already have it' log message from warning to info, except when we're a dirauth (fixes bug 5238) 2012-06-28 10:42:43 -04:00
Nick Mathewson
d4285f03df Extend tor_sscanf so it can replace sscanf in rephist.c
Fixes bug 4195 and Coverity CID 448
2012-06-28 09:54:05 -04:00
Nick Mathewson
28c42fe029 Fix GETINFO address-mappings/... with wildcarded addresses. 2012-06-27 23:55:01 -04:00
Nick Mathewson
e12eba55b2 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-27 23:45:59 -04:00
Nick Mathewson
23f2e37ff7 Allow wildcarded mapaddress targets in controller MAPADDRESS command 2012-06-27 23:38:04 -04:00
Roger Dingledine
0b3f5ca11f merge changes files into upcoming changelog 2012-06-27 21:32:17 -04:00
Nick Mathewson
86197dfd4f Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-26 11:04:43 -04:00
Nick Mathewson
6330d2d9e6 Merge remote-tracking branch 'public/bug6227' into maint-0.2.3 2012-06-26 11:03:56 -04:00
Nick Mathewson
05dd0a9cd9 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-26 11:03:32 -04:00
Nick Mathewson
5fad3dc36b Fix a warning when using glibc's strcspn with clang.
With glibc 2.15 and clang 3.0, I get warnings from where we use the
strcpsn implementation in the header as strcspn(string, "=").  This
is apparently because clang sees that part of the strcspn macro
expands to "="[2], and doesn't realize that that part of the macro
is only evaluated when "="[1] != 0.
2012-06-26 11:02:44 -04:00
Nick Mathewson
9c8ec0aa20 Add a unit test for environment_variable_names_equal
I need this because I'm about to frob that function to stop using
strcspn() in order to get rid of a clang warning.
2012-06-26 10:50:37 -04:00
Nick Mathewson
4050800251 Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-26 10:30:51 -04:00
Nick Mathewson
c4586f4df7 Downgrade message about md cache cleaning from notice to info
Fix for #6238
2012-06-26 10:30:11 -04:00
Nick Mathewson
4645f28c3b Bump the test util/threads timeout up to 150 sec
This should make some debian build systems happier.

Also, increase the select() timeout to a more reasonable 100 msec.
2012-06-25 13:44:34 -04:00
Nick Mathewson
7c9f6a994f Merge remote-tracking branch 'origin/maint-0.2.3' 2012-06-25 13:23:07 -04:00
George Kadianakis
53e4452f98 Don't do DNS lookups when parsing corrupted managed proxy messages.
The functions parse_{s,c}method_line() were using
tor_addr_port_lookup() which is capable of doing DNS lookups. DNS
lookups should not be necessary when parsing {C,S}METHOD lines.
2012-06-25 13:19:22 -04:00
Nick Mathewson
888d5d08fe Merge remote-tracking branch 'public/bug2385' 2012-06-25 12:05:36 -04:00
Nick Mathewson
f54ac08846 Tweak bug5099 changes file 2012-06-23 15:10:43 -04:00
George Kadianakis
8c3a4a1d21 Improve log message issued when a managed proxy fails to launch. 2012-06-23 15:05:46 -04:00
Nick Mathewson
ebda15e4b5 Merge remote-tracking branch 'public/bug6211' into maint-0.2.3 2012-06-22 22:38:59 -04:00
Nick Mathewson
a9de982c34 Merge remote-tracking branch 'public/bug6203_v2' into maint-0.2.3 2012-06-22 22:33:14 -04:00
Andrea Shepard
4c62cc6f99 Make format_helper_exit_status() avoid unnecessary spaces 2012-06-22 22:21:19 -04:00
Nick Mathewson
c239c57d3c Fix a regression bug in AllowDotExit
The code that detected the source of a remapped address checked that
an address mapping's source was a given rewrite rule if addr_orig had
no .exit, and addr did have a .exit after processing that rule.  But
addr_orig was formatted for logging: it was not the original address
at all, but rather was the address escaped for logging and possibly
replaced with "[scrubbed]".

This new logic will correctly set ADDRMAPSRC_NONE in the case when the
address starts life as a .exit address, so that AllowDotExit can work
again.

Fixes bug 6211; bugfix on 0.2.3.17-beta
2012-06-19 19:50:03 -04:00
Nick Mathewson
0600e8cab1 Disable warning for marked-but-reading in main.c
It turns out this can happen.  Even though there is no reason for
connections to be marked but reading, we leave them reading anyway,
so warning here is unwarranted.  Let's turn that back on once we do
something sensible and disable reading when we mark.  Bugfix for
6203 on Tor 0.2.3.17-beta.

Thanks to cypherpunks for pointing out the general stupidity of the
original code here.
2012-06-19 12:22:43 -04:00
Nick Mathewson
dcb1d0a67b add bug number and explanation to changes/bug2385; call it a feature 2012-06-18 13:20:02 -04:00
Nick Mathewson
e6782b355a Merge remote-tracking branch 'public/bug3311' 2012-06-18 12:07:39 -04:00
Nick Mathewson
72acdfe134 Merge branch 'bug4748_squashed' 2012-06-18 12:01:56 -04:00
Nick Mathewson
f5e86bcd6c Document 0.2.3.x torrc/default-torrc/command line semantics changes
Bug 4748

squash! Document 0.2.3.x torrc/default-torrc/command line semantics changes

Incorporates fixes suggested by rransom.
2012-06-18 12:01:27 -04:00
Nick Mathewson
4cbd6e46ef Merge branch 'bug6173_rebased' 2012-06-18 11:52:03 -04:00
Nick Mathewson
4432fa40dd Merge remote-tracking branch 'andrea/bug6028' 2012-06-18 11:51:55 -04:00
Nick Mathewson
adbdeafad9 More sophisticated attempt at detecting working linker options
On some platforms, the linker is perfectly happy to produce binaries
that won't run if you give it the wrong set of flags.  So when not
cross-compiling, try to link-and-run a little test program, rather
than just linking it.

Possible fix for 6173.
2012-06-18 11:48:45 -04:00
Andrea Shepard
a782893ed0 Add change file bug2385 2012-06-15 21:54:26 -07:00
Andrea Shepard
1f7f10e4f3 Always set *socket_error to something appropriate when returning -1 from connection_connect() 2012-06-15 16:53:32 -07:00
Nick Mathewson
bdfb399867 Merge remote-tracking branch 'public/xxx023' 2012-06-15 16:10:59 -04:00
Nick Mathewson
87409771c4 Clarify some messages about publishing hidden service descriptors
Fix for bug 3311.
2012-06-15 15:25:46 -04:00
Nick Mathewson
cc21e56ed4 Check the correct consensus before giving it to the client
Previously, a directory would check the latest NS consensus for
having the signatures the client wanted, and use that consensus's
valid_until time to set the HTTP lifetime.  With this patch, the
directory looks at NS consensus or the microdesc consensus,
depending on what the client asked for.
2012-06-15 15:07:54 -04:00
Nick Mathewson
32bf258881 Change a silent ignore-the-bug in microdesc.c to a LOG_INFO
I don't believe this bug occurs, but there was an XXX023 to make
sure it doesn't.
2012-06-15 15:07:54 -04:00
Nick Mathewson
e62104a7d2 Move tor_gettimeofday_cached() into compat_libevent 2012-06-15 15:07:53 -04:00
Nick Mathewson
1755f792ed Refactor GETINFO process/descriptor-limit
Previously it duplicated some getrlimit code and content from compat.c;
now it doesn't.
2012-06-15 15:07:53 -04:00
Nick Mathewson
879b1e1010 Merge remote-tracking branch 'public/bug5932' 2012-06-15 14:44:32 -04:00
Nick Mathewson
8030ec4f27 Downgrade log messages about cbt enabled/disabled. Bug 6169. 2012-06-15 09:57:18 -04:00
Roger Dingledine
f56e3122d8 fold in next changes items 2012-06-15 03:10:07 -04:00