teor (Tim Wilson-Brown)
c281c03654
If both IPv4 and IPv6 addresses could be used, choose one correctly
...
If there is a node, use node_ipv6_or/dir_preferred().
If there is no node, use fascist_firewall_prefer_ipv6_or/dirport().
2016-02-20 23:40:37 +11:00
Nick Mathewson
838d4dee12
make check-spaces
2016-02-11 12:50:55 -05:00
teor (Tim Wilson-Brown)
c213f277cd
Make bridge clients prefer the configured bridge address
...
When ClientPreferIPv6ORPort is auto, bridges prefer the configured
bridge ORPort address. Otherwise, they use the value of the option.
Other clients prefer IPv4 ORPorts if ClientPreferIPv6ORPort is auto.
When ClientPreferIPv6DirPort is auto, all clients prefer IPv4 DirPorts.
2016-02-03 23:56:19 +11:00
teor (Tim Wilson-Brown)
c4cb4706c9
Merge branch 'feature17840-v11-squashed' into feature17840-v11-merged
...
Conflicts:
src/or/directory.c
src/test/test_routerlist.c
Fix minor conflicts.
2016-01-29 07:37:06 +11:00
teor (Tim Wilson-Brown)
4528f89316
Make entry_guard_set_status consistent with entry_is_live
...
Check fascist_firewall_allows_node in entry_guard_set_status and
return the same message as entry_is_live.
2016-01-29 07:15:53 +11:00
teor (Tim Wilson-Brown)
1648666203
Choose bridge addresses by IPv4/IPv6 preferences
2016-01-29 07:15:53 +11:00
teor (Tim Wilson-Brown)
2d33d192fc
Add ClientUseIPv4 and ClientPreferIPv6DirPort torrc options
...
ClientUseIPv4 0 tells tor to avoid IPv4 client connections.
ClientPreferIPv6DirPort 1 tells tor to prefer IPv6 directory connections.
Refactor policy for IPv4/IPv6 preferences.
Fix a bug where node->ipv6_preferred could become stale if
ClientPreferIPv6ORPort was changed after the consensus was loaded.
Update documentation, existing code, add unit tests.
2016-01-29 07:13:57 +11:00
teor (Tim Wilson-Brown)
c927b6cb1a
Correct grammatical errors in tor comments
...
Avoid using gender for things that don't have it.
Avoid assigning a gender to tor users.
2016-01-26 13:46:54 +11:00
teor (Tim Wilson-Brown)
d3546aa92b
Prop210: Add want_authority to directory_get_from_dirserver
2015-12-16 04:03:45 +11:00
Nick Mathewson
241e6b0937
Fix some conversion problems
2015-04-23 09:16:42 -04:00
David Goulet
3f41318472
Add crypto_rand_int_range() and use it
...
Incidently, this fixes a bug where the maximum value was never used when
only using crypto_rand_int(). For instance this example below in
rendservice.c never gets to INTRO_POINT_LIFETIME_MAX_SECONDS.
int intro_point_lifetime_seconds =
INTRO_POINT_LIFETIME_MIN_SECONDS +
crypto_rand_int(INTRO_POINT_LIFETIME_MAX_SECONDS -
INTRO_POINT_LIFETIME_MIN_SECONDS);
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-04-21 11:06:12 -04:00
Sebastian Hahn
86002a83d3
Bridges are always dirs
...
This check was accidentally deleted in 05f7336624
.
2015-04-01 21:07:46 +02:00
Nick Mathewson
081b0c0f77
mark dirinfo_type as unused in populate_live_entry_guards
2015-04-01 14:20:01 -04:00
Nick Mathewson
05f7336624
Remove version checks for microdescriptor support
...
At this point, relays without microdescriptor support are no longer
allowed on the Tor network.
2015-03-24 09:25:35 -04:00
Nick Mathewson
0f31080d63
Stop checking for torrc state files generated by very old Tor versions
...
These haven't worked in so long that if you had a state file of this
kind, the guards in it would be so old that you wouldn't use them
anyway.
2015-03-24 09:24:12 -04:00
Nick Mathewson
6378bcf4b9
Fix an implicit-narrowing warning
2015-02-18 09:34:15 -05:00
Nick Mathewson
96211bcf71
Merge branch 'bug9321_rerebase'
...
Conflicts:
src/or/dirvote.h
src/test/include.am
src/test/test_entrynodes.c
2015-02-18 09:17:02 -05:00
George Kadianakis
14a3c17ce6
Calculate the guardfraction bandwidth of a guard.
2015-02-18 09:09:33 -05:00
George Kadianakis
f4a63f8eab
Parse GuardFraction info from consensuses and votes.
...
Also introduce the UseGuardFraction torrc option which decides whether
clients should use guardfraction information found in the consensus.
2015-02-18 09:09:33 -05:00
David Goulet
b101f4e98c
Control: getinfo entry-guards report down-since
...
If the guard unreachable_since variable was set, the status "up" was
reported which is wrong. This adds the "down" status followed by the
unreachable_since time value.
Fixes #14184
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-02-06 16:06:20 -05:00
Matthew Finkel
4cb59ceb8e
Only retry connecting to configured bridges
...
After connectivity problems, only try connecting to bridges which
are currently configured; don't mark bridges which we previously
used but are no longer configured. Fixes 14216. Reported by
and fix provided by arma.
2015-01-31 09:46:18 +00:00
Nick Mathewson
79e12da861
Merge remote-tracking branch 'public/bug12485'
2015-01-18 13:49:30 -05:00
Nick Mathewson
33df3e37ff
Allow two ISO times to appear in EntryGuardDownSince.
...
When I made time parsing more strict, I broke the
EntryGuardDownSince line, which relied on two concatenated ISO times
being parsed as a single time.
Fixes bug 14136. Bugfix on 7984fc1531
. Bug not in any released
version of Tor.
2015-01-09 08:50:56 -05:00
Nick Mathewson
fb68f50761
Lower the delay before saving guard status to disk
...
"Maybe this time should be reduced, since we are considering
guard-related changes as quite important? It would be a pity to
settle on a guard node, then close the Tor client fast and lose that
information."
Closes 12485.
2015-01-07 10:39:44 -05:00
Nick Mathewson
da26bb646e
Turn entry_guards_changed constants into symbolic constants
2015-01-07 10:37:33 -05:00
Nick Mathewson
f54e54b0b4
Bump copyright dates to 2015, in case someday this matters.
2015-01-02 14:27:39 -05:00
Nick Mathewson
9619c395ac
Merge remote-tracking branch 'andrea/ticket6456'
...
Somewhat tricky conflicts:
src/or/config.c
Also, s/test_assert/tt_assert in test_config.c
2014-11-04 09:52:04 -05:00
Nick Mathewson
fcdcb377a4
Add another year to our copyright dates.
...
Because in 95 years, we or our successors will surely care about
enforcing the BSD license terms on this code. Right?
2014-10-28 15:30:16 -04:00
teor
ff42222845
Improve DIRINFO flags' usage comments
...
Document usage of the NO_DIRINFO and ALL_DIRINFO flags clearly in functions
which take them as arguments. Replace 0 with NO_DIRINFO in a function call
for clarity.
Seeks to prevent future issues like 13163.
2014-10-08 05:36:54 +11:00
Nick Mathewson
1a1e695800
Merge remote-tracking branch 'public/bug7733a'
2014-09-22 10:38:05 -04:00
Nick Mathewson
87f9c51f64
Avoid unsigned/sign compare warning from last patch.
2014-09-01 15:42:17 -04:00
Philip Van Hoof
60a3897ed9
Bounds check while looping over a fixed size table or array
...
(Edited to use existing ARRAY_LENGTH macro --nickm)
2014-09-01 15:40:47 -04:00
rl1987
8b539cc276
Unit testing entry_is_time_to_retry().
2014-08-20 15:29:56 -04:00
rl1987
c731a1c68f
Write comments for members of periods array.
2014-08-20 15:29:56 -04:00
rl1987
197d855009
Rewriting entry_is_time_to_retry() using table approach.
2014-08-20 15:29:55 -04:00
Andrea Shepard
b8b46e8ef8
Add some mocks needed to unit test ClientTransportPlugin/ServerTransportPlugin config line parsing
2014-07-25 21:41:03 -07:00
Roger Dingledine
bc9866e13f
Merge branch 'maint-0.2.5'
2014-07-24 16:23:26 -04:00
Roger Dingledine
a4c641cce9
Merge branch 'maint-0.2.4' into maint-0.2.5
2014-07-24 16:23:08 -04:00
Roger Dingledine
9fc276a1c7
add a NumDirectoryGuards consensus param too
2014-07-24 16:19:47 -04:00
Roger Dingledine
56ee61b8ae
Add and use a new NumEntryGuards consensus parameter.
...
When specified, it overrides our default of 3 entry guards.
(By default, it overrides the number of directory guards too.)
Implements ticket 12688.
2014-07-24 16:19:47 -04:00
Nick Mathewson
5690284559
Fix wide lines, make entry_is_live() non-inline
2014-07-16 16:52:16 +02:00
George Kadianakis
8bbb217964
Change the interface of entry_is_live() to take a bitmap.
2014-06-25 15:44:36 -04:00
George Kadianakis
46d41e6e9b
Basic entry_is_live() unittest.
2014-06-25 15:39:00 -04:00
George Kadianakis
61629b4f6c
Document choose_random_entry_impl() and populate_live_entry_guards().
2014-06-15 19:03:38 -07:00
George Kadianakis
bf263a9b99
Make a few entrynodes.c functions testable.
2014-06-15 19:02:59 -07:00
George Kadianakis
71da44f159
Make populate_live_entry_guards() more smoothly testable.
2014-06-15 19:02:59 -07:00
George Kadianakis
c7b05a6aef
Constify aggressively in populate_live_entry_guards().
2014-06-15 19:02:59 -07:00
George Kadianakis
a59429f1e4
Fix the functionality of populate_live_entry_guards().
2014-06-15 19:02:55 -07:00
George Kadianakis
427cc8a452
Move code from choose_random_entry_impl() to the new function.
...
This commit only _moves_ code.
2014-06-15 18:25:45 -07:00
George Kadianakis
e8c366e9ea
Create skeleton for populate_live_entry_guards().
...
Now we are ready to move code from choose_random_entry_impl() to it.
2014-06-15 18:25:45 -07:00