Sebastian Hahn
11e8a445c3
Fix a couple of harmless clang3.2 warnings
2012-12-31 18:23:28 +01:00
Nick Mathewson
5e22cfe2b4
Fix a crash bug when running an node without IPv6-exit support.
...
Fixes bug 7814; bugfix on 0.2.4.7-alpha.
2012-12-29 01:22:34 -05:00
Nick Mathewson
127cb39ffc
Rate-limit "No circuits are opened" message to once-per-hour
...
mr-4 reports on #7799 that he was seeing it several times per second,
which suggests that things had gone very wrong.
This isn't a real fix, but it should make Tor usable till we can
figure out the real issue.
2012-12-26 10:05:45 -05:00
Nick Mathewson
2e9be92cd7
Fix a possibly-unused-var warning. Thank you, GCC.
2012-12-25 23:37:41 -05:00
Nick Mathewson
01a09e8f86
Fix compilation warning: must not format u64 as long.
2012-12-25 23:34:38 -05:00
Nick Mathewson
8324824d8f
Fix whitespace
2012-12-25 23:34:16 -05:00
Nick Mathewson
885e8d35c7
Merge remote-tracking branch 'mikeperry/209-path-bias-changes'
2012-12-25 23:30:28 -05:00
Nick Mathewson
0f9dfef9d6
Add configuration options for directory guards
...
In addition to all the other ways to make directory gurads not go,
you can now set UseEntryGuardsAsDirGuards to 0.
2012-12-25 23:14:43 -05:00
Nick Mathewson
0c4210fb65
Directory guard implementation.
...
Implements proposal 207; ticket 6526.
2012-12-25 23:14:43 -05:00
Nick Mathewson
1df7289000
Remember which of our guards are directory caches
2012-12-25 23:10:41 -05:00
Nick Mathewson
a7c6b4ab91
Split choosing a regular directory into its own fn
2012-12-25 23:10:41 -05:00
Nick Mathewson
68dae4cf35
One last fix for a warning on non-EC systems
2012-12-25 22:12:18 -05:00
Nick Mathewson
ddbe28919a
Be more noncomittal about performance improvement of uint128 backend.
2012-12-25 21:08:42 -05:00
Nick Mathewson
25afecdbf9
Make ECDHE group configurable: 224 for public, 256 for bridges (default)
2012-12-25 20:22:46 -05:00
Nick Mathewson
c8b3bdb782
Inform the user if they're passing up a 10x ECDH speedup.
2012-12-25 20:14:07 -05:00
Nick Mathewson
2f8fd53750
Add benchmark for DH handshake and ECDH-P-224/56 handshake
2012-12-25 20:14:07 -05:00
Nick Mathewson
175b2678d7
Let servers choose better ciphersuites when clients support them
...
This implements the server-side of proposal 198 by detecting when
clients lack the magic list of ciphersuites that indicates that
they're lying faking some ciphers they don't really have. When
clients lack this list, we can choose any cipher that we'd actually
like. The newly allowed ciphersuites are, currently, "All ECDHE-RSA
ciphers that openssl supports, except for ECDHE-RSA-RC4".
The code to detect the cipher list relies on on (ab)use of
SSL_set_session_secret_cb.
2012-12-25 20:14:07 -05:00
Nick Mathewson
63208aa1e5
Remove the address argument from client cipher classification fns
2012-12-25 20:14:07 -05:00
Nick Mathewson
047d9e57b0
Cache the type of client cipher list we have in the tor_tls_t
...
We already use this classification for deciding whether (as a server)
to do a v2/v3 handshake, and we're about to start using it for
deciding whether we can use good ciphersuites too.
2012-12-25 20:14:07 -05:00
Nick Mathewson
2a26e1d45f
prop198: Detect the list of ciphersuites we used to lie about having
...
This is less easy than you might think; we can't just look at the
client ciphers list, since openssl doesn't remember client ciphers if
it doesn't know about them. So we have to keep a list of the "v2"
ciphers, with the ones we don't know about removed.
2012-12-25 20:14:07 -05:00
Nick Mathewson
bbaf4d9643
Configure SSL context to know about using P-256 for ECDHE.
2012-12-25 20:14:03 -05:00
Roger Dingledine
747d284088
bump to 0.2.4.7-alpha-dev
2012-12-25 02:52:53 -05:00
Roger Dingledine
d3c2254fda
bump to 0.2.4.7-alpha
2012-12-24 04:04:04 -05:00
Nick Mathewson
8b5787ec0d
When there are no dir_server_ts to choose, don't crash
...
It's important not to call choose_array_element_by_weight and then
pass its return value unchecked to smartlist_get : it is allowed to
return -1.
Fixes bug 7756; bugfix on 4e3d07a6
(not in any released Tor)
2012-12-18 21:32:53 -05:00
Mike Perry
406d59a9c9
Nick's Code review #3 part 2.
2012-12-18 14:16:01 -08:00
Mike Perry
b0fc18c37e
Changes from Nick's code review 'part 1'
...
I think this is actually his third code review of this branch so far.
2012-12-18 13:26:36 -08:00
Nick Mathewson
7a99d26c79
Add packaged cell fullness to the heartbeat message.
...
This is an attempt to diagnose the severity of bug 7743.
2012-12-18 15:16:35 -05:00
Nick Mathewson
9b9cc6774f
Merge branch 'ticket7570_7571'
...
Conflicts:
src/or/routerlist.c
2012-12-17 15:49:09 -05:00
Nick Mathewson
4a07ea4a8c
Drop the maximum attempts to get a virtual address to 1000.
...
This is good enough to give P_success >= 999,999,999/1,000,000,000 so
long as the address space is less than 97.95 full. It'd be ridiculous
for that to happen for IPv6, and usome reasonable assumptions, it
would also be pretty silly for IPv4.
2012-12-17 14:51:31 -05:00
Nick Mathewson
4ded40b0ca
Add missing doxygen for DNS and automap code
2012-12-17 14:51:31 -05:00
Nick Mathewson
8d080d0b01
Per-listener option to prefer IPv6 automaps when possible.
2012-12-17 14:51:30 -05:00
Nick Mathewson
de4cc126cb
Build and test most of the machinery needed for IPv6 virtualaddrmaps
...
With an IPv6 virtual address map, we can basically hand out a new
IPv6 address for _every_ address we connect to. That'll be cool, and
will let us maybe get around prop205 issues.
This uses some fancy logic to try to make the code paths in the ipv4
and the ipv6 case as close as possible, and moves to randomly
generated addresses so we don't need to maintain those stupid counters
that will collide if Tor restarts but apps don't.
Also has some XXXX items to fix to make this useful. More design
needed.
2012-12-17 14:51:29 -05:00
Nick Mathewson
963b3d1549
Refactor the code to check if an address is matched by automapsuffixes
2012-12-17 14:50:55 -05:00
Nick Mathewson
88d7312ff2
Fix another uninitialized var warning from GCC
2012-12-17 14:50:05 -05:00
Nick Mathewson
8969d9e0b6
Fixed an unused-variable warning
2012-12-17 14:50:05 -05:00
Nick Mathewson
8eb422e7bd
Don't use the cache when changing an IP address because of an exit policy
2012-12-17 14:50:05 -05:00
Nick Mathewson
ac990aa44a
Turn off by-default use of client-side DNS cacheing.
2012-12-17 14:50:04 -05:00
Nick Mathewson
7315a67646
Refactor port_cfg_t creation into a port_cfg_new() function
...
This function gives us a single place to set reasonable default flags
for port_cfg_t entries, to avoid bugs like the one where we weren't
setting ipv4_traffic_ok to 1 on SocksPorts initialized in an older
way.
2012-12-17 14:50:03 -05:00
Nick Mathewson
7536c40e96
Implement option to turn off DNS cache modification by a client port
...
(This is part 3 of making DNS cache use enabled/disabled on a
per-client port basis. This implements the UseCacheIPv[46]DNS options)
2012-12-17 14:48:09 -05:00
Nick Mathewson
f33487668f
Implement option to turn off DNS cache use on a client port
...
(This is part 2 of making DNS cache use enabled/disabled on a
per-client port basis. This implements the CacheIPv[46]DNS options,
but not the UseCachedIPv[46] ones.)
2012-12-17 14:48:09 -05:00
Nick Mathewson
32219d8313
Oops: make the check for not adding ip->ip DNS maps correct
2012-12-17 14:48:09 -05:00
Nick Mathewson
d3e9e03cac
Add options to turn DNS cache use on or off per client port.
...
(This is part 1 of making DNS cache use enabled/disabled on a
per-client port basis. These options are shuffled around correctly,
but don't do anything yet.)
2012-12-17 14:48:08 -05:00
Nick Mathewson
44a9a47706
Oops; make DNSPort configuration take address family options
2012-12-17 14:48:08 -05:00
Nick Mathewson
3874e74b49
Avoid a 'may be used uninitialized' warning
...
Fixes bug 7746; bug not in any released version of Tor.
2012-12-17 11:14:12 -05:00
Nick Mathewson
b1ff8daeb5
Nuke uses of memcmp outside of unit tests
...
We want to be saying fast_mem{cmp,eq,neq} when we're doing a
comparison that's allowed to exit early, or tor_mem{cmp,eq,neq} when
we need a data-invariant timing. Direct use of memcmp tends to imply
that we haven't thought about the issue.
2012-12-13 17:34:05 -05:00
Nick Mathewson
579808d4cd
Merge remote-tracking branch 'origin/maint-0.2.3'
...
Conflicts:
src/config/geoip
2012-12-13 12:52:44 -05:00
Nick Mathewson
52bf1556b1
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
2012-12-13 12:51:28 -05:00
Nick Mathewson
6a468a1722
Fix two wide lines in config.c
2012-12-13 12:44:17 -05:00
Nick Mathewson
01ac961ca1
Merge branch 'fallback_dirsource_v3'
2012-12-13 12:42:29 -05:00
Karsten Loesing
6bdfa295b5
Add link explaining how the geoip file was created.
2012-12-13 08:45:25 +01:00
Karsten Loesing
c9a5d613a6
Update to the December 2012 GeoIP database.
2012-12-13 08:44:30 +01:00
Karsten Loesing
d2cfd52d2c
Update to the November 2012 GeoIP database.
2012-12-13 08:44:20 +01:00
Mike Perry
ccaeef22e1
Tags on relay cells can result in certain reason codes.
...
Close the circuit (it's probably junk anyways), and make sure we don't probe
it/count it as a success.
2012-12-11 17:49:12 -08:00
Mike Perry
af9011f824
Woops, this log message triggers with the 2-hop bias commit.
2012-12-11 17:19:39 -08:00
Mike Perry
c1bc6a1124
Add a missing comment.
2012-12-10 00:36:10 -08:00
Mike Perry
d409c8a90d
More log message and space fixups.
2012-12-10 00:28:07 -08:00
Mike Perry
aa16d59ee7
Clean up some XXX comments.
2012-12-09 23:50:05 -08:00
Mike Perry
4590993ff3
Space fixes.
2012-12-09 23:47:04 -08:00
Mike Perry
b75880d7b3
Fix a rather serious use-count state bug.
...
We need to use the success count or the use count depending on the consensus
parameter.
2012-12-09 20:56:48 -08:00
Mike Perry
2dbb62f1b5
Convert to doubles for all pathbias state.
...
Let's hope this solves the rounding error issue..
2012-12-09 20:53:22 -08:00
Mike Perry
ab1fce5c19
Also shorten circuit_successes to circ_successes.
...
For consistency and great justice.
Ok, mostly consistency.
2012-12-09 20:24:50 -08:00
Mike Perry
a90f165b83
Rename first_hop to circ_attempt.
...
Since we've generalized what we can count from (first or second hop), we
should generalize the variable and constant naming too.
2012-12-09 20:24:22 -08:00
Mike Perry
04866055e8
Change from first hop accounting to 2nd hop accounting
...
This has several advantages, including more resilience to ambient failure.
I still need to rename all the first_hop vars tho.. Saving that for a separate
commit.
2012-12-09 20:02:41 -08:00
Mike Perry
fbbf894d4d
Add intro+rend cannibalize param..
2012-12-09 20:02:08 -08:00
Mike Perry
930fbb2fec
Flag cannibalized circs as used (non-ideal).
...
Also add some comments.
2012-12-09 19:18:04 -08:00
Mike Perry
686fc22259
Allow any valid 'end' cell to mean a circuit was used successfully.
...
Also improve some log messages.
2012-12-08 16:37:22 -08:00
Mike Perry
b599a6ed07
Sadly, we can't safely count client intro circ success
2012-12-08 14:16:29 -08:00
Mike Perry
5f733ccd73
Fix some hidden service edge cases.
2012-12-08 12:07:58 -08:00
Mike Perry
26fa47226c
Refactor path use bias code into own function.
...
Also, improve and log some failure cases.
2012-12-07 17:47:23 -08:00
Mike Perry
c3b71a3fc9
Actually, both nacks and acks indicate a valid path
2012-12-07 15:50:31 -08:00
Mike Perry
dc86d7c35b
Note more potential issues.
2012-12-07 15:28:38 -08:00
Mike Perry
ecaeb505fa
Note a strange case for SOCKS streams.
2012-12-07 15:28:38 -08:00
Mike Perry
7a28862d56
Fix another crash bug.
2012-12-07 15:28:38 -08:00
Mike Perry
721f7e3751
Fix a crash bug and pass down a remote reason code.
...
Unexpected channel closures count as remote circ failures.
2012-12-07 15:28:38 -08:00
Mike Perry
9b40466072
Document that care needs to be taken with any_streams_attached.
2012-12-07 15:28:38 -08:00
Mike Perry
c3028edba6
Remove n_chan codepaths for determinining guard.
...
Cpath is apparently good enough.
2012-12-07 15:28:38 -08:00
Mike Perry
a630726884
Move a pathbias function that depends on entryguard_t.
2012-12-07 15:28:38 -08:00
Mike Perry
7f8cbe389d
Fix a crash due to NULL circ->n_chan.
...
Is this redundant? Can we always rely on circ->cpath->extend_info
being present for origin circuits?
2012-12-07 15:28:38 -08:00
Mike Perry
428fbfc1d5
Prop209: Rend circuits weren't ever marked dirty.
2012-12-07 15:28:38 -08:00
Mike Perry
aa0e6e2c03
Prop 209: Add in hidserv path bias counts for usage.
2012-12-07 15:28:38 -08:00
Mike Perry
412ae099cb
Prop 209: Add path bias counts for timeouts and other mechanisms.
...
Turns out there's more than one way to block a tagged circuit.
This seems to successfully handle all of the normal exit circuits. Hidden
services need additional tweaks, still.
2012-12-07 15:28:38 -08:00
Mike Perry
da5c398d79
Be explicit about units for timeout.
2012-12-07 15:28:37 -08:00
Mike Perry
ef1b830ef8
Fix an assert crash and an incorrectly placed return.
2012-12-07 15:28:37 -08:00
Mike Perry
bb548134cd
Update with code review changes from Nick.
2012-12-07 15:28:37 -08:00
Mike Perry
192996690c
Fix spaces.
2012-12-07 15:28:37 -08:00
Mike Perry
a54873648f
Refactor pathbias functions to use pathbias_should_count.
2012-12-07 15:28:37 -08:00
Mike Perry
ab9c83c949
Update Path Bias log messages to match Proposal 209.
2012-12-07 15:28:37 -08:00
Mike Perry
9bf5582e73
Add log message checks for different rates.
...
May want to squash this forward or back..
2012-12-07 15:28:37 -08:00
Mike Perry
248fbc3619
Update pathbias parameters to match Proposal 209.
...
Needs manpage update and testing still..
2012-12-07 15:28:37 -08:00
Mike Perry
954f263ed5
Add the ability to count circuit timeouts for guards.
...
This is purely for informational reasons for debugging.
2012-12-07 15:28:36 -08:00
Nick Mathewson
c8056dcbbb
Fix some wide lines
2012-12-07 14:14:20 -05:00
Nick Mathewson
3fa9151f26
Merge branch 'win64-7260'
...
Conflicts:
src/or/dns.c
2012-12-07 14:12:17 -05:00
Nick Mathewson
cd4f56a37c
Fix infinite loop in circuit_expire_bulding
...
Fixes bug 7663; bug introduced in 42e3c04a7a
. Not in any
released version of Tor.
2012-12-07 14:08:07 -05:00
Nick Mathewson
f366b0112e
Merge remote-tracking branch 'karsten/task-6266'
2012-12-07 11:39:56 -05:00
Nick Mathewson
81fcebcd05
Merge branch 'bug7306'
2012-12-07 11:11:26 -05:00
Nick Mathewson
025dc19b63
Merge remote-tracking branch 'public/bug6887'
2012-12-07 11:02:27 -05:00
Mike Perry
42e3c04a7a
Bug 3443: Don't count ORconn setup in circuit build time.
...
Also, add a hack Roger suggested where we're more patient if no circuits are
opened yet.
2012-12-07 10:34:09 -05:00
Nick Mathewson
f742b33d85
Drop FallbackNetworkstatusFile; it never worked.
2012-12-06 11:28:49 -05:00
Nick Mathewson
a8d491a8fd
Add an option to weight down authorities when choosing a fallback
2012-12-06 11:28:49 -05:00
Nick Mathewson
06cd62266f
Add a way to configure selection weights for dir_server_t
2012-12-06 11:28:49 -05:00