]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
14 years agopaint bug2474's fix a different neon color
Roger Dingledine [Thu, 8 Dec 2011 09:41:56 +0000 (04:41 -0500)] 
paint bug2474's fix a different neon color

this way people with 80-column logs may read more of the warning

14 years agoMerge branch 'maint-0.2.2'
Roger Dingledine [Thu, 8 Dec 2011 09:40:30 +0000 (04:40 -0500)] 
Merge branch 'maint-0.2.2'

14 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Thu, 8 Dec 2011 09:40:15 +0000 (04:40 -0500)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

14 years agofold in changes files
Roger Dingledine [Thu, 8 Dec 2011 09:38:37 +0000 (04:38 -0500)] 
fold in changes files

14 years agoUpdate to the December 2011 GeoIP database.
Karsten Loesing [Thu, 8 Dec 2011 08:55:44 +0000 (09:55 +0100)] 
Update to the December 2011 GeoIP database.

14 years agoRemove 4312 from the changelog.
Nick Mathewson [Thu, 8 Dec 2011 02:10:32 +0000 (21:10 -0500)] 
Remove 4312 from the changelog.

14 years agoMerge remote-tracking branch 'public/revert_4312'
Nick Mathewson [Thu, 8 Dec 2011 02:12:20 +0000 (21:12 -0500)] 
Merge remote-tracking branch 'public/revert_4312'

14 years agoclarify a debug line
Roger Dingledine [Wed, 7 Dec 2011 23:12:11 +0000 (18:12 -0500)] 
clarify a debug line

14 years agoAdd changes file for feature2553
Robert Ransom [Wed, 7 Dec 2011 12:44:13 +0000 (04:44 -0800)] 
Add changes file for feature2553

14 years agoRevert "Refactor the SSL_set_info_callback() callbacks."
Nick Mathewson [Wed, 7 Dec 2011 00:49:21 +0000 (19:49 -0500)] 
Revert "Refactor the SSL_set_info_callback() callbacks."

This reverts commit 69a821ea1c9357acdd5aa1c9e23fd030b01cb5a9.

14 years agoRevert "Detect renegotiation when it actually happens."
Nick Mathewson [Wed, 7 Dec 2011 00:49:21 +0000 (19:49 -0500)] 
Revert "Detect renegotiation when it actually happens."

This reverts commit 4fd79f9def28996552b5739792f428c2514de1f6.

14 years agoRevert "Detect and deny excess renegotiations attempts."
Nick Mathewson [Wed, 7 Dec 2011 00:49:21 +0000 (19:49 -0500)] 
Revert "Detect and deny excess renegotiations attempts."

This reverts commit ecd239e3b577705e0669d47293a2e755cf93cec0.

14 years agoRevert "Get rid of tor_tls_block_renegotiation()."
Nick Mathewson [Wed, 7 Dec 2011 00:49:21 +0000 (19:49 -0500)] 
Revert "Get rid of tor_tls_block_renegotiation()."

This reverts commit 340809dd224b244675496e301d3ba154a6fe68d0.

14 years agoRevert "Also handle needless renegotiations in SSL_write()."
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Also handle needless renegotiations in SSL_write()."

This reverts commit e2b3527106e0747f652e2f28fa087d9874e0e2ce.

14 years agoRevert "Fix issues pointed out by nickm."
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Fix issues pointed out by nickm."

This reverts commit e097bffaed72af6b19f7293722021196bb94de1e.

14 years agoRevert "Use callback-driven approach to block renegotiations."
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Use callback-driven approach to block renegotiations."

This reverts commit 406ae1ba5ad529a4d0e710229dab6ed645d42b50.

14 years agoRevert "appease check-spaces"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "appease check-spaces"

This reverts commit f77f9bddb8bf0dd6e9c3e0d94269aa23f459a272.

14 years agoRevert "Refactor tor_event_base_once to do what we actually want"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Refactor tor_event_base_once to do what we actually want"

This reverts commit 7920ea55b8d994268d2b07f27316b0f34d8f27e5.

14 years agoRevert "Avoid a double-mark in connection_or_close_connection_cb"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Avoid a double-mark in connection_or_close_connection_cb"

This reverts commit 633071eb3bcf2c4106e93de28d727594bd23b1db.

14 years agoRevert "Fix some wide lines in tortls.c"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Fix some wide lines in tortls.c"

This reverts commit e8dde3aabd3e1292d381eb4269c6457548dca6b9.

14 years agoRevert "use event_free() wrapper; fix bug 4582"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "use event_free() wrapper; fix bug 4582"

This reverts commit 9a88c0cd32df53116a6bbb6b961650943755061c.

14 years agoRevert "Don't schedule excess_renegotiations_callback unless it's set"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Don't schedule excess_renegotiations_callback unless it's set"

This reverts commit 617617e21a2d30a86cea9c8f7043333078f2e8f8.

14 years agoRevert "indent; add comment"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "indent; add comment"

This reverts commit 40a87c4c08be0cdd87a3df283f285b3c2a0c8445.

14 years agoRevert "Make pending libevent actions cancelable"
Nick Mathewson [Wed, 7 Dec 2011 00:49:20 +0000 (19:49 -0500)] 
Revert "Make pending libevent actions cancelable"

This reverts commit aba25a6939a5907d40dbcff7433a8c130ffd12ad.

14 years agoRevert "Set renegotiation callbacks immediately on tls inititation"
Nick Mathewson [Wed, 7 Dec 2011 00:49:19 +0000 (19:49 -0500)] 
Revert "Set renegotiation callbacks immediately on tls inititation"

This reverts commit e27a26d568a257cf350814a9abfa47d3b41ad9f3.

14 years agoMerge remote-tracking branch 'sebastian/coverity'
Nick Mathewson [Mon, 5 Dec 2011 16:56:03 +0000 (11:56 -0500)] 
Merge remote-tracking branch 'sebastian/coverity'

14 years agoAdd comment about bug4651 fix
Nick Mathewson [Mon, 5 Dec 2011 16:29:43 +0000 (11:29 -0500)] 
Add comment about bug4651 fix

14 years agocid 432: Remove dead code if we don't handle a consensus
Sebastian Hahn [Fri, 2 Dec 2011 15:35:45 +0000 (16:35 +0100)] 
cid 432: Remove dead code if we don't handle a consensus

Bugfix on 0.2.3.1, fixes the second half of bug 4637.

14 years agoDon't send two ESTABLISH_RENDEZVOUS cells when opening a new rend circ
Robert Ransom [Sun, 4 Dec 2011 06:06:50 +0000 (22:06 -0800)] 
Don't send two ESTABLISH_RENDEZVOUS cells when opening a new rend circ

14 years agoDon't just tell the controller "foo" on id mismatch
Nick Mathewson [Fri, 2 Dec 2011 21:27:33 +0000 (16:27 -0500)] 
Don't just tell the controller "foo" on id mismatch

Fixes bug 4169; bugfix on 0.2.1.1-alpha.

14 years agoInit conn->addr to "unspec" on cpuworker connections
Nick Mathewson [Fri, 2 Dec 2011 21:21:50 +0000 (16:21 -0500)] 
Init conn->addr to "unspec" on cpuworker connections

Fixes bug 4532 reported by "troll_un"

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Fri, 2 Dec 2011 21:17:52 +0000 (16:17 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

Conflicts:
src/or/connection_or.c

The conflict in src/or/connection_or.c is resolved by taking the
version in master, since e27a26d5 already fixed bug 4531 on master.
This merge just adds the changes file from 0.2.2.

14 years agoDon't call tor_tls_set_logged_address till after checking conn->tls
Nick Mathewson [Fri, 2 Dec 2011 21:15:52 +0000 (16:15 -0500)] 
Don't call tor_tls_set_logged_address till after checking conn->tls

Fixes bug 4531; partial backport of e27a26d5.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Fri, 2 Dec 2011 21:10:17 +0000 (16:10 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agotor_accept_socket() should take tor_addr_t for listener arg
Nick Mathewson [Fri, 2 Dec 2011 21:09:16 +0000 (16:09 -0500)] 
tor_accept_socket() should take tor_addr_t for listener arg

Fixes bug 4535; bugfix on 0.2.2.28-beta; found by "troll_un"

14 years agoGive DirAllowPrivateAddress an explicit default
Nick Mathewson [Fri, 2 Dec 2011 21:04:18 +0000 (16:04 -0500)] 
Give DirAllowPrivateAddress an explicit default

By convention, we say whether each bool's default is 0 or 1

Fixes 4536; found by "troll_un"

14 years agoResolve bug 3448: remove mention of tor-ops (which is not in use)
Nick Mathewson [Fri, 2 Dec 2011 20:42:15 +0000 (15:42 -0500)] 
Resolve bug 3448: remove mention of tor-ops (which is not in use)

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Fri, 2 Dec 2011 20:38:29 +0000 (15:38 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoFix bug 4530; check return val of tor_addr_lookup correctly
Nick Mathewson [Fri, 2 Dec 2011 20:37:24 +0000 (15:37 -0500)] 
Fix bug 4530; check return val of tor_addr_lookup correctly

Fix on 0.2.1.5-alpha; reported by troll_un

14 years agoMerge remote-tracking branch 'sebastian/coverity_strlen_fp'
Nick Mathewson [Fri, 2 Dec 2011 05:24:33 +0000 (00:24 -0500)] 
Merge remote-tracking branch 'sebastian/coverity_strlen_fp'

14 years agoWork around a false positive in Coverity.
Sebastian Hahn [Fri, 2 Dec 2011 05:15:31 +0000 (06:15 +0100)] 
Work around a false positive in Coverity.

Fixes cid 501 and 502.

14 years agoAppease check-spaces
Sebastian Hahn [Fri, 2 Dec 2011 05:16:47 +0000 (06:16 +0100)] 
Appease check-spaces

14 years agoDon't segfault when checking whether a not-yet-used intro point should expire
Robert Ransom [Thu, 1 Dec 2011 23:26:45 +0000 (15:26 -0800)] 
Don't segfault when checking whether a not-yet-used intro point should expire

Found by katmagic.  Bugfix on the #3460 branch, not yet in any release.

14 years agoFix warnings.
Linus Nordberg [Thu, 1 Dec 2011 08:40:47 +0000 (09:40 +0100)] 
Fix warnings.

Remove environ declaration.
Use ORPort->value.  And it's a string.
Make tmp a char *.

14 years agoAdd an initializer to appease older gcc
Nick Mathewson [Wed, 30 Nov 2011 23:08:07 +0000 (18:08 -0500)] 
Add an initializer to appease older gcc

14 years agoOnly define set_buffer_lengths_to_zero if bufferevents are enabled
Murdoch@cl.cam.ac.uk [Wed, 30 Nov 2011 20:14:46 +0000 (20:14 +0000)] 
Only define set_buffer_lengths_to_zero if bufferevents are enabled

Otherwise, on Windows, gcc will warn about the function being unused

14 years agoMerge remote-tracking branch 'sjmurdoch/bug1983-port-tor-fw-helper-to-windows'
Nick Mathewson [Wed, 30 Nov 2011 22:51:01 +0000 (17:51 -0500)] 
Merge remote-tracking branch 'sjmurdoch/bug1983-port-tor-fw-helper-to-windows'

14 years agoMake file descriptor type an unsigned integer
Steven Murdoch [Wed, 30 Nov 2011 20:41:27 +0000 (20:41 +0000)] 
Make file descriptor type an unsigned integer

This avoids a warning from gcc (comparison between signed and unsigned
integer expressions [-Werror=sign-compare]), under Windows

14 years agoMerge branch 'feature2553-v4-rebased'
Nick Mathewson [Wed, 30 Nov 2011 19:54:33 +0000 (14:54 -0500)] 
Merge branch 'feature2553-v4-rebased'

14 years agoAdd some more documentation
Arturo Filastò [Thu, 24 Nov 2011 09:28:38 +0000 (10:28 +0100)] 
Add some more documentation

14 years agoAdd support for tor2web mode via configure
Arturo Filastò [Thu, 24 Nov 2011 06:53:04 +0000 (07:53 +0100)] 
Add support for tor2web mode via configure

14 years agoTurn off LearnCircuitBuildTimeout when tor2web mode is on
Robert Ransom [Tue, 14 Jun 2011 08:40:02 +0000 (01:40 -0700)] 
Turn off LearnCircuitBuildTimeout when tor2web mode is on

14 years agoAdd ifdefs to disable assertion in connection_ap_handshake_send_begin
Robert Ransom [Wed, 23 Nov 2011 22:10:46 +0000 (14:10 -0800)] 
Add ifdefs to disable assertion in connection_ap_handshake_send_begin

14 years agoAdd ifdefs to disable #3332 assertions
Robert Ransom [Wed, 23 Nov 2011 22:07:46 +0000 (14:07 -0800)] 
Add ifdefs to disable #3332 assertions

14 years agoUse single-hop intro and rend circuits when in tor2web mode
Robert Ransom [Wed, 1 Jun 2011 09:00:59 +0000 (02:00 -0700)] 
Use single-hop intro and rend circuits when in tor2web mode

14 years agoPerform single-hop HS desc fetches when in tor2web mode
Robert Ransom [Wed, 1 Jun 2011 08:45:24 +0000 (01:45 -0700)] 
Perform single-hop HS desc fetches when in tor2web mode

14 years agoDon't allow tor2web-mode Tors to connect to non-HS addresses
Robert Ransom [Tue, 31 May 2011 14:05:40 +0000 (07:05 -0700)] 
Don't allow tor2web-mode Tors to connect to non-HS addresses

The client's anonymity when accessing a non-HS address in tor2web-mode
would be easily nuked by inserting an inline image with a .onion URL, so
don't even pretend to access non-HS addresses through Tor.

14 years agoWarn loudly on startup and SIGHUP if Tor is built for a non-anonymous mode
Robert Ransom [Thu, 24 Nov 2011 00:46:38 +0000 (16:46 -0800)] 
Warn loudly on startup and SIGHUP if Tor is built for a non-anonymous mode

14 years agoAdd a compile-time #define to control whether Tor runs in 'tor2web mode'
Robert Ransom [Thu, 24 Nov 2011 00:58:15 +0000 (16:58 -0800)] 
Add a compile-time #define to control whether Tor runs in 'tor2web mode'

The Tor2webMode torrc option is still required to run a Tor client in
'tor2web mode', but now it can't be turned on at runtime in a normal build
of Tor.  (And a tor2web build of Tor can't be used as a normal Tor client,
so we don't have to worry as much about someone distributing packages with
this particular pistol accessible to normal users.)

14 years agoSupport NAT-PMP on Windows
Steven Murdoch [Wed, 30 Nov 2011 19:37:17 +0000 (19:37 +0000)] 
Support NAT-PMP on Windows

- Link in libws32 and libiphlpapi, needed for libnatpmp (both in
  ./configure and when compiling tor-fw-helper-natpmp.c)
- Define STATICLIB under Windows, to allow tor-fw-helper-natpmp.c to link
- Don't include arpa/inet.h which isn't present in Mingw32 and doesn't
  appear to be needed on either Windows or MacOS X

14 years agoMerge branch 'bug933_nm_rebased_v2'
Nick Mathewson [Wed, 30 Nov 2011 19:10:22 +0000 (14:10 -0500)] 
Merge branch 'bug933_nm_rebased_v2'

Conflicts:
src/test/test.c

14 years agoTweak addressmap_rewrite a little more
Nick Mathewson [Wed, 30 Nov 2011 19:02:58 +0000 (14:02 -0500)] 
Tweak addressmap_rewrite a little more

This resolves a loop warning on "MapAddress *.example.com
example.com", makes the rewrite log messages correct, and fixes the
behavior of "MapAddress *.a *.b" when just given "a" as an input.

14 years agoFix an issue in my mapaddress domains code spotted by arma
Nick Mathewson [Sat, 26 Nov 2011 01:13:55 +0000 (20:13 -0500)] 
Fix an issue in my mapaddress domains code spotted by arma

MapAddress *.torproject.org torproject.org would have been interpreted
as a map from a domain to itself, and would have cleared the mapping.
Now we require not only a match of domains, but of wildcards.

14 years agoAdd some post-comma spaces to please arma
Nick Mathewson [Sat, 26 Nov 2011 00:46:11 +0000 (19:46 -0500)] 
Add some post-comma spaces to please arma

Incidentally, we've got 30969 lines in master with a comma
in them, of which 1995 have a comma followed by a non-newline,
non-space character.  So about 93% of our commas are right,
but we have a substantial number of "crowded" lines.

14 years agoRevise MapAddress manpage
Nick Mathewson [Thu, 8 Sep 2011 16:19:27 +0000 (12:19 -0400)] 
Revise MapAddress manpage

make the asciidoc work; make the example more generic; tighten the
prose a little; be more specific that *.example.com matches
example.com; simplify an example.

14 years agoForbid remapping of *
Nick Mathewson [Thu, 8 Sep 2011 16:04:34 +0000 (12:04 -0400)] 
Forbid remapping of *

It might be nice to support this someday, but for now it would fail
with an infinite remap cycle.  (If I say "remap * *.foo.exit",
then example.com ->
     example.com.foo.exit ->
     example.com.foo.exit.foo.exit ->
     example.com.foo.exit.foo.exit.foo.exit -> ...)

14 years agoRefactor addressmap_match_superdomains and representation of wildcards
Nick Mathewson [Thu, 8 Sep 2011 15:54:24 +0000 (11:54 -0400)] 
Refactor addressmap_match_superdomains and representation of wildcards

In this new representation for wildcarded addresses, there are no
longer any 'magic addresses': rather, "a.b c.d", "*.a.b c.d" and
"*.a.b *.c.d" are all represented by a mapping from "a.b" to "c.d". we
now distinguish them by setting bits in the addressmap_entry_t
structure, where src_wildcard is set if the source address had a
wildcard, and dst_wildcard is set if the target address had a
wildcard.

This lets the case where "*.a.b *.c.d" or "*.a.b c.d" remap the
address "a.b" get handled trivially, and lets us simplify and improve
the addressmap_match_superdomains implementation: we can now have it
run in O(parts of address) rather than O(entries in addressmap).

14 years agoNo new "LEGACY" tests allowed.
Nick Mathewson [Thu, 8 Sep 2011 15:19:06 +0000 (11:19 -0400)] 
No new "LEGACY" tests allowed.

14 years agoFix compilation: get_options() now returns const
Nick Mathewson [Thu, 8 Sep 2011 13:30:21 +0000 (09:30 -0400)] 
Fix compilation: get_options() now returns const

14 years agoAddress nickm's comments at https://trac.torproject.org/projects/tor/ticket/933#comment:8
Robert Hogan [Mon, 27 Dec 2010 17:35:16 +0000 (17:35 +0000)] 
Address nickm's comments at https://trac.torproject.org/projects/tor/ticket/933#comment:8

    1. Only allow '*.' in MapAddress expressions. Ignore '*ample.com' and '.example.com'.
       This has resulted in a slight refactoring of config_register_addressmaps.
    2. Add some more detail to the man page entry for AddressMap.
    3. Fix initialization of a pointer to NULL rather than 0.
    4. Update the unit tests to cater for the changes in 1 and test more explicitly for
       recursive mapping.

14 years agoAddress nickm's comments at https://trac.torproject.org/projects/tor/ticket/933#comment:4
Robert Hogan [Mon, 13 Dec 2010 22:13:01 +0000 (22:13 +0000)] 
Address nickm's comments at https://trac.torproject.org/projects/tor/ticket/933#comment:4

1. Implement the following mapping rules:

   MapAddress a.b.c d.e.f # This is what we have now
   MapAddress .a.b.c d.e.f # Replaces any address ending with .a.b.c with d.e.f
   MapAddress .a.b.c .d.e.f # Replaces the .a.b.c at the end of any addr with .d.e.f

   (Note that 'a.b.c .d.e.f' is invalid, and will be rejected.)

2. Add tests for the new rules.

3. Allow proper wildcard annotation, i.e. '*.d.e' '.d.e' will still work.

4. Update addressmap_entry_t with an is_wildcard member.

14 years agobug933 - Match against super-domains in MapAddress
Robert Hogan [Mon, 2 Aug 2010 19:09:37 +0000 (20:09 +0100)] 
bug933 - Match against super-domains in MapAddress

Allow MapAddress to handle directives such as:

MapAddress .torproject.org .torserver.exit
MapAddress .org 1.1.1.1

Add tests for addressmap_rewrite.

14 years agoMerge branch 'bug4538_v2'
Nick Mathewson [Wed, 30 Nov 2011 18:18:56 +0000 (13:18 -0500)] 
Merge branch 'bug4538_v2'

14 years agoFree the global DH parameters in crypto_global_cleanup().
George Kadianakis [Tue, 22 Nov 2011 14:14:59 +0000 (15:14 +0100)] 
Free the global DH parameters in crypto_global_cleanup().

14 years agoMove crypto_global_cleanup() to the bottom of crypto.c.
George Kadianakis [Tue, 22 Nov 2011 14:11:40 +0000 (15:11 +0100)] 
Move crypto_global_cleanup() to the bottom of crypto.c.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Wed, 30 Nov 2011 17:41:08 +0000 (12:41 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoFix a memory leak in error path of my default-torrc code
Nick Mathewson [Wed, 30 Nov 2011 17:16:39 +0000 (12:16 -0500)] 
Fix a memory leak in error path of my default-torrc code

Fixes Coverity CID # 500

14 years agoResolve a resource leak in test_util_split_lines
Nick Mathewson [Wed, 30 Nov 2011 17:16:08 +0000 (12:16 -0500)] 
Resolve a resource leak in test_util_split_lines

Fixes coverity CID # 488

14 years agoappease "make check-spaces"
Nick Mathewson [Wed, 30 Nov 2011 17:09:53 +0000 (12:09 -0500)] 
appease "make check-spaces"

14 years agoMerge branch 'ipv6_bridges_squashed'
Nick Mathewson [Wed, 30 Nov 2011 17:02:13 +0000 (12:02 -0500)] 
Merge branch 'ipv6_bridges_squashed'

14 years agoRename one more recalcitrant function.
Nick Mathewson [Wed, 30 Nov 2011 17:01:16 +0000 (12:01 -0500)] 
Rename one more recalcitrant function.

14 years agoAdd changes file.
Linus Nordberg [Tue, 29 Nov 2011 14:39:22 +0000 (15:39 +0100)] 
Add changes file.

14 years agoWarn user about client ignoring non-preferred IP address for a bridge.
Linus Nordberg [Tue, 29 Nov 2011 14:25:04 +0000 (15:25 +0100)] 
Warn user about client ignoring non-preferred IP address for a bridge.

14 years agoWhitespace changes.
Linus Nordberg [Tue, 29 Nov 2011 10:00:43 +0000 (11:00 +0100)] 
Whitespace changes.

14 years agoMake the router_get_*_orport interface consistent with node_*.
Linus Nordberg [Mon, 28 Nov 2011 12:51:56 +0000 (13:51 +0100)] 
Make the router_get_*_orport interface consistent with node_*.

14 years agoMake router_get_{prim,alt,pref}_addr_port take tor_addr_port_t *.
Linus Nordberg [Mon, 28 Nov 2011 12:47:12 +0000 (13:47 +0100)] 
Make router_get_{prim,alt,pref}_addr_port take tor_addr_port_t *.

Rename to *_orport for consistency with node_*.

14 years agoMerge node_get_{prim,pref,pref_ipv6}_addr with their _orport counterparts.
Linus Nordberg [Mon, 28 Nov 2011 11:15:58 +0000 (12:15 +0100)] 
Merge node_get_{prim,pref,pref_ipv6}_addr with their _orport counterparts.

This keeps the IP address and TCP for a given OR port together,
reducing the risk of using an address for one address family with a
port of another.

Make node_get_addr() a wrapper function for compatibility.

14 years agoUse correct address family where necessary for bridges on IPv6.
Linus Nordberg [Thu, 24 Nov 2011 18:01:56 +0000 (19:01 +0100)] 
Use correct address family where necessary for bridges on IPv6.

14 years agoUse the preferred address and port when initiating a connection.
Linus Nordberg [Thu, 24 Nov 2011 17:59:24 +0000 (18:59 +0100)] 
Use the preferred address and port when initiating a connection.

This is not as conservative as we could do it, f.ex. by looking at the
connection and only do this for connections to bridges.  A non-bridge
should never have anything else than its primary IPv4 address set
though, so I think this is safe.

14 years agoTake IPv6 into account when rewriting routerinfo for a bridge and maintain ipv6_prefe...
Linus Nordberg [Thu, 24 Nov 2011 17:54:20 +0000 (18:54 +0100)] 
Take IPv6 into account when rewriting routerinfo for a bridge and maintain ipv6_preferred.

Don't touch the string representation in routerinfo_t->address.

Also, set or clear the routerinfo_t->ipv6_preferred flag based on the
address family of the bridge.

14 years agoUse preferred address when looking for bridges by routerinfo_t.
Linus Nordberg [Thu, 24 Nov 2011 17:42:15 +0000 (18:42 +0100)] 
Use preferred address when looking for bridges by routerinfo_t.

This should be safe to do for all uses of get_configured_bridge_by_routerinfo().

14 years agoClarify function documentation.
Linus Nordberg [Thu, 24 Nov 2011 17:39:27 +0000 (18:39 +0100)] 
Clarify function documentation.

14 years agoFirst chunk of support for bridges on IPv6
Linus Nordberg [Thu, 24 Nov 2011 17:29:56 +0000 (18:29 +0100)] 
First chunk of support for bridges on IPv6

Comments below focus on changes, see diff for added code.

New type tor_addr_port_t holding an IP address and a TCP/UDP port.

New flag in routerinfo_t, ipv6_preferred.  This should go in the
node_t instead but not now.

Replace node_get_addr() with
- node_get_prim_addr() for primary address, i.e. IPv4 for now
- node_get_pref_addr() for preferred address, IPv4 or IPv6.

Rename node_get_addr_ipv4h() node_get_prim_addr_ipv4h() for
consistency.  The primary address will not allways be an IPv4 address.
Same for node_get_orport() -> node_get_prim_orport().

Rewrite node_is_a_configured_bridge() to take all OR ports into account.

Extend argument list to extend_info_from_node and
extend_info_from_router with a flag indicating if we want to use the
routers primary address or the preferred address.  Use the preferred
address in as few situtations as possible for allowing clients to
connect to bridges over IPv6.

14 years agoTurn get_first_advertised_v4_port_by_type() into get_first_advertised_port_by_type_af().
Linus Nordberg [Thu, 24 Nov 2011 16:49:31 +0000 (17:49 +0100)] 
Turn get_first_advertised_v4_port_by_type() into get_first_advertised_port_by_type_af().

14 years agoAdd some logging and comments.
Linus Nordberg [Thu, 24 Nov 2011 16:40:10 +0000 (17:40 +0100)] 
Add some logging and comments.

14 years agoBridges can advertise a single IPv6 address with orport
Nick Mathewson [Wed, 9 Nov 2011 02:13:54 +0000 (21:13 -0500)] 
Bridges can advertise a single IPv6 address with orport

This is deliberately more restrictive than we'd want to be.

Needs testing!

14 years agoInitial support for simplest use of prop186 or-address lines
Nick Mathewson [Tue, 8 Nov 2011 21:51:30 +0000 (16:51 -0500)] 
Initial support for simplest use of prop186 or-address lines

This lets a routerinfo_t have a single IPv6 or-address, and adds
support for formatting and parsing those lines.

14 years agoInitial hacking for proposal 186.
Nick Mathewson [Tue, 8 Nov 2011 21:10:38 +0000 (16:10 -0500)] 
Initial hacking for proposal 186.

This code handles the new ORPort options, and incidentally makes all
remaining port types use the new port configuration systems.

There are some rough edges!  It doesn't do well in the case where your
Address says one thing but you say to Advertise another ORPort.  It
doesn't handle AllAddrs.  It doesn't actually advertise anything besides
the first listed advertised IPv4 ORPort and DirPort.  It doesn't do
port forwarding to them either.

It's not tested either, it needs more documentation, and it probably
forgets to put the milk back in the refrigerator.

14 years agoAdd an assert before dereferencing entry_conn->socks_request
Robert Ransom [Wed, 30 Nov 2011 04:34:33 +0000 (20:34 -0800)] 
Add an assert before dereferencing entry_conn->socks_request

This may turn a segfault which katmagic saw into an assertion failure.

14 years agoMerge remote-tracking branch 'rransom-tor/bug3460-v4'
Nick Mathewson [Wed, 30 Nov 2011 01:56:39 +0000 (20:56 -0500)] 
Merge remote-tracking branch 'rransom-tor/bug3460-v4'

Conflicts:
src/or/rendservice.c