Commit Graph

16321 Commits

Author SHA1 Message Date
Nick Mathewson
93dc7dcf41 Reject IPv4 or IPv6 addresses from the user depending on SOCKS settings 2012-11-14 23:16:23 -05:00
Nick Mathewson
111321ed16 Rename ipv{4,6}_only to bind_ipv{4,6}_only
This is to avoid confusion with the ipv{4,6}_traffic flags.
2012-11-14 23:16:23 -05:00
Nick Mathewson
4bec25c3cd Add {No,}IPv{4,6}Traffic options to SOCKSPort
These options are for telling the SOCKSPort that it should allow or
not allow connections to IPv4/IPv6 addresses.

These aren't implemented yet; this is just the code to read the
options and get them into the entrey_connection_t.
2012-11-14 23:16:23 -05:00
Nick Mathewson
b7843ca554 Make DNS callback pass IPv6 answers to dns_answer_found
Also, count ipv6 timeouts vs others.  If we have too many ipv6
requests time out, then we could be degrading performance because of a
broken DNS server that ignores AAAA requests.  Other cases in which
we never learn an AAAA address aren't so bad, since they don't slow
A (ipv4) answers down very much.
2012-11-14 23:16:23 -05:00
Nick Mathewson
00633b9446 Make dns wildcarding checks work for ipv6 2012-11-14 23:16:22 -05:00
Nick Mathewson
9016d9e829 Add an IPv6Exit configuration option
Don't advertise an IPv6 exit policy, or accept IPv6 exit requests,
if IPv6Exit is not true.
2012-11-14 23:16:22 -05:00
Nick Mathewson
c3faa0ebd5 Simplest version of server-side IPv6 support (no dns)
This is a relatively simple set of changes: we mostly need to
remove a few "but not for IPv6" changes.  We also needed to tweak
the handling of DNS code to generate RESOLVED cells that could get
an IPv6 answer in return.
2012-11-14 23:16:22 -05:00
Nick Mathewson
c64ee7099f Record, send, and receive flags in BEGIN cells 2012-11-14 23:16:22 -05:00
Nick Mathewson
b35a0d1132 Add IPv6 support to compare_to_addr_to_node_policy 2012-11-14 23:16:22 -05:00
Nick Mathewson
04ea550141 Authorities put p6 lines into microdescriptors. 2012-11-14 23:16:22 -05:00
Nick Mathewson
c53adac122 Parse IPv6 policy summaries from router descriptors and microdescs 2012-11-14 23:16:22 -05:00
Nick Mathewson
a96c0affcb Better policy support for IPv6
Now, "accept *:80" means "accept all addresses on port 80", and not
just IPv4.  For just v4, say "accept *4:80"; for just v6 say "accept
*6:80".

We can parse these policies from torrc just fine, and we should be
successfully keeping them out of descriptors for now.

We also now include appropriate IPv6 addresses in "reject private:*"
2012-11-14 23:16:21 -05:00
Nick Mathewson
2eb7eafc9d Add a new family-specific syntax for tor_addr_parse_mask_ports
By default, "*" means "All IPv4 addresses" with
tor_addr_parse_mask_ports, so I won't break anything.  But if the new
EXTENDED_STAR flag is provided, then * means "any address", *4 means
"any IPv4 address" (that is, 0.0.0.0/0), and "*6" means "any IPv6
address" (that is, [::]/0).

This is going to let us have a syntax for specifying exit policies in
torrc that won't drive people mad.

Also, add a bunch of unit tests for tor_addr_parse_mask_ports to test
these new features, and to increase coverage.
2012-11-14 23:16:21 -05:00
Nick Mathewson
462ebb270a Refactor begin cell parsing into its own function, with tests.
Add 'flags' argument to begin cells, per proposal 208.
2012-11-14 23:16:21 -05:00
Nick Mathewson
ca8843df0a Refactor client_dns_set_{reverse_,}addressmap() to take a circ
We'd like these functions to be circuit-relative so that we can
implement a per-circuit DNS cache and per-circuit DNS cache rules for
proposal 205 or its successors.  I'm doing this now, as a part of the
IPv6 exits code, since there are about to be a few more instances
of code using this.
2012-11-14 23:16:21 -05:00
Nick Mathewson
7908ab2093 Move address map into its own file. 2012-11-14 23:16:20 -05:00
Andrea Shepard
2cb82c33bc Merge branch 'bug7267' of ssh://git-rw.torproject.org/user/andrea/tor 2012-11-13 18:54:24 -08:00
Andrea Shepard
3db3daa663 Add comment explaining different channel close functions 2012-11-13 18:50:37 -08:00
Nick Mathewson
02a43e5eb6 Merge remote-tracking branch 'public/bug7059' 2012-11-13 21:50:07 -05:00
Nick Mathewson
b17aa28e46 Actually distribute the geoip6 file.
Fixes a bug (with no ticket) on 0.2.4.6-alpha.
2012-11-13 21:24:28 -05:00
Andrea Shepard
3b517ea5f4 Add changes file for bug 7267 2012-11-13 13:46:36 -08:00
Andrea Shepard
7ab3004223 Call channel_mark_for_close() properly in hibernate_go_dormant() 2012-11-13 13:45:00 -08:00
Roger Dingledine
83b1a50cc0 bump to 0.2.4.6-alpha-dev 2012-11-13 01:46:59 -05:00
Roger Dingledine
b13c6becc8 bump to 0.2.4.6-alpha 2012-11-13 00:00:33 -05:00
Roger Dingledine
713b5eb31c fold in changes files 2012-11-12 23:51:47 -05:00
Roger Dingledine
a90affa84b Merge branch 'maint-0.2.3' 2012-11-12 23:49:37 -05:00
Roger Dingledine
88bb48e785 use a more logical operator
Fix a harmless bug when opting against publishing a relay descriptor
because DisableNetwork is set.

Fixes bug 7464; bugfix on 0.2.3.9-alpha.
2012-11-12 23:47:21 -05:00
Nick Mathewson
f473d83dea Possible fix for bug 7212
This is the simplest possible workaround: make it safe to call
circuit_cell_queue_clear() on a non-attached circuit, and make it
safe-but-a-LD_BUG-warning to call update_circuit_on_cmux() on a
non-attached circuit.

 LocalWords:  unstage src Untracked
2012-11-12 08:28:09 -05:00
Andrea Shepard
0523c8de7d Merge branch 'check_for_orconn_on_close_squashed' of ssh://git-rw.torproject.org/user/andrea/tor 2012-11-10 03:24:41 -08:00
Andrea Shepard
fc1a9a13cf Add changes file for connection_mark_for_close()/connection_mark_and_flush() or_connection_t checking 2012-11-10 02:38:40 -08:00
Andrea Shepard
99e82cab30 Make everything in connection.c that uses connection_or_notify_error() also use connection_mark_and_close_internal() to avoid spurious warnings 2012-11-10 02:35:47 -08:00
Andrea Shepard
8124398835 Check for orconns in connection_mark_for_close and connection_mark_and_flush, and pass the call through channel_close_for_error with a warning to avoid asserts 2012-11-10 02:35:47 -08:00
Nick Mathewson
713736a6a7 Fix a memory leak in handling errors on CERTS cells. bug 7422 2012-11-08 23:01:39 -05:00
Nick Mathewson
8b5d95db0d Fix test.c compilation on mingw32.
Looks like windows doesn't have an s6_addr32 in its in6_addr.

Bug not in any released version of Tor; bugfix on abb886014e.
2012-11-08 20:18:34 -05:00
Nick Mathewson
08436b27ff Merge remote-tracking branch 'origin/maint-0.2.3' 2012-11-08 20:00:54 -05:00
Nick Mathewson
e567b4482a Turn a memwipe in tor_process_handle_destroy() back to memset
It broke linking on tor-resolve.c, and it's not actually sanitizing
anything sensitive.  Fix for bug 7420; bug not on ony released Tor.
2012-11-08 19:59:54 -05:00
Nick Mathewson
e1c7d12b1d Turn some memset()s introduced in tor 0.2.4 into memwipe()s 2012-11-08 17:00:36 -05:00
Nick Mathewson
81deddb08c Merge remote-tracking branch 'origin/maint-0.2.3'
Conflicts:
	src/common/crypto.c
	src/or/rendservice.c
2012-11-08 16:48:04 -05:00
Nick Mathewson
9ad4776e61 Merge branch 'bug7352_023_rebased' into maint-0.2.3 2012-11-08 16:45:46 -05:00
Nick Mathewson
49dd5ef3a3 Add and use and unlikely-to-be-eliminated memwipe()
Apparently some compilers like to eliminate memset() operations on
data that's about to go out-of-scope.  I've gone with the safest
possible replacement, which might be a bit slow.  I don't think this
is critical path in any way that will affect performance, but if it
is, we can work on that in 0.2.4.

Fixes bug 7352.
2012-11-08 16:44:50 -05:00
Andrea Shepard
9f3f5372b8 Merge branch 'bug7350' of ssh://git-rw.torproject.org/user/andrea/tor 2012-11-07 11:43:04 -08:00
Andrea Shepard
3b270e86be Add changes file for bug7350 2012-11-07 11:39:49 -08:00
Andrea Shepard
80eb03ae0a Don't call channel_send_destroy() when closing a circuit on a closing channel 2012-11-06 17:58:59 -08:00
Andrea Shepard
688cea7248 Check for closing channel in channel_send_destroy() 2012-11-06 17:52:14 -08:00
Nick Mathewson
cd054ceada Merge branch 'bug7285' 2012-11-06 18:02:03 -05:00
Nick Mathewson
b0688bbf49 Merge branch 'bug7195' 2012-11-06 17:53:45 -05:00
George Kadianakis
a9f786758d Add warning message when a managed proxy dies during configuration. 2012-11-06 17:53:09 -05:00
Nick Mathewson
11c467f643 Fix a stupid logic-error in warnings about low ports.
Instead of warning about low ports that are advertised, we should have
been warning about low ports that we're listening on.  Bug 7285, fix
on 0.2.3.9-alpha.
2012-11-06 17:15:39 -05:00
Nick Mathewson
0e8be13b9f Allow an optional $ in GETINFO ns/id/<identity>
That's not where I'd want to put a $, but apparently the other
foo/id/<identity> things allow it, as does an arguably valid
interpretation of control-spec.txt.  So let's be consistent.

Fix for a piece of bug 7059.
2012-11-04 22:12:11 -05:00
Nick Mathewson
39a0a2c3ae Merge remote-tracking branch 'asn/bug7292' 2012-11-04 21:54:19 -05:00