Commit Graph

16056 Commits

Author SHA1 Message Date
Linus Nordberg
96a7313475 Update geoip6. 2012-10-17 10:54:53 +02:00
Karsten Loesing
1f849f9181 Minor tweaks to nils' v4 vs v6 bridge usage code. 2012-10-17 10:54:53 +02:00
Karsten Loesing
c03e3d66a9 Minor tweaks and comments to nils' geoip v6 code. 2012-10-17 10:54:52 +02:00
nils
31e224173b Include statistics as to how many connections are IPv4 versus IPv6 2012-10-17 10:54:52 +02:00
nils
abb886014e Add GeoIP database for IPv6 addresses 2012-10-17 10:54:52 +02:00
nils
167363403b Rename address family specific IPv4 geoip functions in preparation for IPv6 support 2012-10-17 10:54:17 +02:00
Andrea Shepard
4da2864308 Merge branch 'bug7087' of git://git.torproject.org/user/andrea/tor 2012-10-15 07:22:33 -07:00
Andrea Shepard
3894ca1508 Add debug logging for channel_free() and channel_force_free() 2012-10-15 06:46:23 -07:00
Andrea Shepard
9ef286ec8f Correctly clear cmux policies and free cmux in channel_free() and channel_force_free() 2012-10-15 06:32:44 -07:00
Nick Mathewson
0d946e1773 Merge remote-tracking branch 'arma/bug7029' 2012-10-14 23:06:43 -04:00
Roger Dingledine
38b7947386 fix trivial typo 2012-10-13 18:34:24 -04:00
Nick Mathewson
45d7fb44c4 typo in src/ext/README; caught by rransom (thanks!) 2012-10-12 19:48:26 -04:00
Nick Mathewson
e3c746384a Fix whitespace in aes.c 2012-10-12 17:17:36 -04:00
Nick Mathewson
286b6df038 Simplify list of files that get whitespace-checked
The rule is simple: Everything not in src/ext!
2012-10-12 17:16:20 -04:00
Nick Mathewson
48b3ae8fe0 Move strlcpy and strlcat into src/ext too 2012-10-12 17:14:28 -04:00
Nick Mathewson
c3162d39bd Distribute src/ext/README. 2012-10-12 17:00:35 -04:00
Nick Mathewson
f1cb14ae49 Add a README file for the src/ext directory. 2012-10-12 17:00:01 -04:00
Nick Mathewson
8586611718 Make tor_addr_is_internal log the calling function on error
This might make it a little easier to track down bug  7086.
2012-10-12 11:34:54 -04:00
Andrea Shepard
9c605ecb7e Install correct incoming cell handlers on reachability testing channels
Fix for bug 7086.
2012-10-12 10:02:13 -04:00
Andrea Shepard
3a33b1fe3b Merge branch 'move_contrib_source' of git://git.torproject.org/nickm/tor 2012-10-11 15:55:26 -07:00
Nick Mathewson
63f542a5c2 Move all externally maintained source files into src/ext
The rationale for treating these files differently is that we should
be checking upstream for changes as applicable, and merging changes
upstream as warranted.
2012-10-11 17:22:03 -04:00
Nick Mathewson
a45760b53b Make very sure to handle cells in-order on channels.
Fix on code for 6465, not yet in any release.
2012-10-11 00:35:58 -04:00
Nick Mathewson
7ea904cbc0 Merge branch 'bug7011'
Conflicts:
	src/or/circuitbuild.c

The conflict was trivial, since no line of code actually changed in
both branches: There was a fmt_addr() that turned into fmt_addrport()
in bug7011, and a "if (!n_conn)" that turned into "if (!n_chan)" in
master.
2012-10-10 22:31:06 -04:00
Nick Mathewson
e6d1ab3600 Fix changes/bug7011 slightly 2012-10-10 22:27:52 -04:00
David Fifield
6e31b9c503 Add changes file for bug7011. 2012-10-10 22:25:30 -04:00
David Fifield
8b3f3fb86e Use fmt_addrport in pt_get_extra_info_descriptor_string.
This patch is by asn.
https://trac.torproject.org/projects/tor/ticket/7011#comment:11
2012-10-10 22:25:30 -04:00
David Fifield
8419d18441 Use fmt_addrport where appropriate.
This is mostly a conversion from this pattern:
	log("... %s:%d ...", fmt_and_decorate_addr(&addr), port);
to this:
	log("... %s ...", fmt_addrport(&addr, port));

The output is the same in all cases.
2012-10-10 22:25:30 -04:00
David Fifield
78e2d8c7a8 Add fmt_addrport.
This function formats an addr:port pair, and always decorates IPv6
addresses.
2012-10-10 22:25:30 -04:00
David Fifield
4b0a039cb8 Use fmt_and_decorate_addr in extra-info "transport" lines.
Apparently BridgeDB is already expecting transport lines to be formatted
thus; see https://trac.torproject.org/projects/tor/ticket/7011#comment:12 ff.
It may be that there are no extant IPv6 pluggable transport bridges yet,
so this didn't cause a problem.
2012-10-10 22:25:29 -04:00
David Fifield
5cbf0f2106 Use fmt_and_decorate_addr in TransportProxy statefile entry.
state_transport_line_is_valid calls tor_addr_port_lookup, which expects
brackets around an IPv6 address. Without this, cached transport
addresses can't be parsed later:

[warn] state: Could not parse addrport.
[warn] state: State file seems to be broken.

See #7011.
2012-10-10 22:25:29 -04:00
David Fifield
41328c7009 Decorate addresses given to a HTTP CONNECT proxy.
This affects the Request-URI and the value of the Host header. RFC 2616
doesn't directly address the formatting of IPv6 addresses, but it
delegates some productions to RFC 2396 "Uniform Resource Identifiers
(URI): Generic Syntax," which is obsoleted by RFC 3986, which requires
square brackets for IPv6 addresses in both places.

I tested this with
	HTTPSProxy 127.0.0.1:8000
	Bridge <IPv6 bridge>
	UseBridges 1
and an Ncat HTTP proxy:
	ncat --proxy-type http -l 8000 -vvv

https://tools.ietf.org/html/rfc2616#section-3.2.1
https://tools.ietf.org/html/rfc2616#section-5.1.2
https://tools.ietf.org/html/rfc2616#section-14.23
https://tools.ietf.org/html/rfc3986#section-3.2.2
2012-10-10 22:25:29 -04:00
David Fifield
34c6ee7e9b Use fmt_and_decorate_addr in log messages. 2012-10-10 22:25:29 -04:00
Andrea Shepard
8b36d4cc2a Merge branch 'bug6816_squashed_nowarn' of git://git.torproject.org/nickm/tor 2012-10-10 18:53:38 -07:00
Nick Mathewson
bd28322d38 Remove variables; fix gcc 4.7 warnings
My GCC warns when variables are assigned to but never used.  There
were a few like that in the 6816/6465 branches.
2012-10-10 21:25:52 -04:00
Andrea Shepard
cf994f7ad7
Add changes file for bug6816 2012-10-10 00:51:55 -07:00
Andrea Shepard
5543c5b202
Fix formatting in various places after 6465/6816 work 2012-10-10 00:48:36 -07:00
Andrea Shepard
217352c362 Make channel_flush_some_cells() compile cleanly on machines with ssize_t larger than int per sjumrdoch comment 2012-10-10 00:44:47 -07:00
Andrea Shepard
bec776480d Don't remove circuitmux hash table entries in circuitmux_detach_circuit() until after circuitmux_make_circuit_inactive() 2012-10-10 00:44:47 -07:00
Andrea Shepard
1bc9a040f7 Fix 'warning: circuit was already inactive' and assert in circuitmux_make_circuit_inactive() during circuitmux_detach_all_circuits() 2012-10-10 00:44:47 -07:00
Andrea Shepard
c9e48ded5d Bring summary comment block in circuitmux.c up to date 2012-10-10 00:44:47 -07:00
Andrea Shepard
49d534e524 New and improved circuitmux_detach_all_circuits(), now without the stupid 2012-10-10 00:44:47 -07:00
Andrea Shepard
c9607694c9 Correctly set magic numbers on ewma policy data/circuit data when allocating 2012-10-10 00:44:47 -07:00
Andrea Shepard
9d615cc5c0 Set circuitmux policy on existing active channels when ewma_enabled changes 2012-10-10 00:44:47 -07:00
Andrea Shepard
bb62281ba4 Set circuitmux policy on new channels in channeltls.c 2012-10-10 00:44:47 -07:00
Andrea Shepard
0c4f717b3e Implement cell_ewma_enabled() 2012-10-10 00:44:47 -07:00
Andrea Shepard
8afe41b481 Implement channel_set_cmux_policy_everywhere() 2012-10-10 00:44:46 -07:00
Andrea Shepard
13972aee78 Fix broken circuitmux_move_active_circ_to_tail(); don't assume n_chan is not NULL in circuitmux_detach_circuit() 2012-10-10 00:44:46 -07:00
Andrea Shepard
903cc8acd1 Allow n_chan to be NULL in circuitmux_find_map_entry(); it can be but with non-NULL p_chan when extending a circuit 2012-10-10 00:44:46 -07:00
Andrea Shepard
a0200c1f6e Use circuit_get_by_circid_channel_even_if_marked() and fix some asserts in circuitmux.c 2012-10-10 00:44:46 -07:00
Andrea Shepard
1498a6e84a Fix some circuitmux-related asserts in relay.c 2012-10-10 00:44:46 -07:00