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)
73fc67bc89
Tor2Web: tell extend_info_from_node intro point connections are direct
2016-01-29 07:16:32 +11:00
teor (Tim Wilson-Brown)
1401117ff2
Return NULL from extend_info_from_node if the node has no allowed address
...
Modify callers to correctly handle these new NULL returns:
* fix assert in onion_extend_cpath
* warn and discard circuit in circuit_get_open_circ_or_launch
* warn, discard circuit, and tell controller in handle_control_extendcircuit
2016-01-29 07:16:32 +11:00
teor (Tim Wilson-Brown)
77a9de0d48
Automatically use IPv6 when ClientUseIPv4 is 0
...
Consequential changes to log messages:
* it's no longer possible to disable both IPv4 and IPv6,
* refactor common string out of remaining log messages
2016-01-29 07:16:32 +11:00
teor (Tim Wilson-Brown)
3a00215c35
Minor whitespace-only fix
2016-01-29 07:16:05 +11:00
teor (Tim Wilson-Brown)
4db5a35e66
Consistently format addresses in node_get_address_string
...
Also, don't write to a buffer with length zero.
2016-01-29 07:16:05 +11:00
teor (Tim Wilson-Brown)
772577b547
Optimise reachability checks when iterating through relay lists
...
Skip address checks on servers.
Skip allowed-only address checks on non-bridge clients with IPv4.
2016-01-29 07:16:04 +11:00
teor (Tim Wilson-Brown)
e991d642ec
Add firewall_is_fascist_dir()
...
Refactor common parts of firewall_is_fascist_or().
2016-01-29 07:16:04 +11:00
teor (Tim Wilson-Brown)
3b8216f215
Use fascist firewall and ClientUseIPv4 for bridge clients
...
Bridge clients ignore ClientUseIPv6, acting as if it is always 1.
This preserves existing behaviour.
Make ClientPreferIPv6OR/DirPort auto by default:
* Bridge clients prefer IPv6 by default.
* Other clients prefer IPv4 by default.
This preserves existing behaviour.
2016-01-29 07:16:04 +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)
c3cc8e16e9
Log when IPv4/IPv6 restrictions or preferences weren't met
2016-01-29 07:13:57 +11:00
teor (Tim Wilson-Brown)
e72cbf7a4e
Choose directory servers by IPv4/IPv6 preferences
...
Add unit tests, refactor pick_directory functions.
2016-01-29 07:13:57 +11:00
teor (Tim Wilson-Brown)
268608c0a0
Choose OR Entry Guards using IPv4/IPv6 preferences
...
Update unit tests.
2016-01-29 07:13:57 +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)
4460feaf28
Fix *_get_all_orports to use ipv6_orport
...
node_get_all_orports and router_get_all_orports incorrectly used or_port
with IPv6 addresses. They now use ipv6_orport.
Also refactor and remove duplicated code.
2016-01-29 07:13:56 +11:00
Nick Mathewson
42dea56363
Merge remote-tracking branch 'teor/bug18145'
2016-01-26 10:01:34 -05:00
teor (Tim Wilson-Brown)
4339fa5609
Replace "Alice" with "the client" in a hidden service log message
2016-01-26 13:49:16 +11:00
teor (Tim Wilson-Brown)
fb939ed82e
Replace Alice/Bob with client/service in hidden service comments
2016-01-26 13:48:31 +11:00
teor (Tim Wilson-Brown)
7a4b4f0c3a
Correct grammatical errors in tor log messages
...
Avoid using gender for things that don't have it.
2016-01-26 13:47:23 +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
Nick Mathewson
0010b8064e
Fix redundant-declaration warning
2016-01-22 09:53:42 -05:00
Nick Mathewson
cbed61d128
Merge remote-tracking branch 'twstrike/parse_port_config_tests'
2016-01-21 12:15:39 -05:00
Nick Mathewson
ae3d2a93f0
Merge remote-tracking branch 'twstrike/options_test'
2016-01-19 20:14:18 -05:00
Ola Bini
32946e2c96
Make sure that tests for domain sockets only run on OSes with domain sockets
2016-01-19 11:14:41 -05:00
Ola Bini
3e738211d4
Use correct u64 int ops instead of regular int ops, in order to avoid warnings on 32bit clang
2016-01-19 11:11:01 -05:00
Nick Mathewson
f557a7f327
Merge branch 'maint-0.2.7'
2016-01-19 08:30:48 -05:00
Nick Mathewson
534a0ba59b
Merge branch 'maint-0.2.6' into maint-0.2.7
2016-01-19 08:30:39 -05:00
Nick Mathewson
e2efa9e321
Refine the memwipe() arguments check for 18089 a little more.
...
We still silently ignore
memwipe(NULL, ch, 0);
and
memwipe(ptr, ch, 0); /* for ptr != NULL */
But we now assert on:
memwipe(NULL, ch, 30);
2016-01-19 08:28:58 -05:00
Nick Mathewson
7b6d7aae09
Merge branch 'fallbacks-0281-squashed'
2016-01-18 20:16:05 -05:00
teor (Tim Wilson-Brown)
ab3c86479a
Add default fallback directories for the 0.2.8 alpha releases
...
Allow fallback directories which have been stable for 30 days
to work around #18050 , which causes relays to submit descriptors
with 0 DirPorts when restarted. (Particularly during Tor version
upgrades.)
Ignore low fallback directory count in alpha builds.
2016-01-18 20:15:59 -05:00
Nick Mathewson
ab58f60321
Merge branch 'maint-0.2.7'
2016-01-18 20:03:28 -05:00
Nick Mathewson
8335b1f9a9
Merge branch 'maint-0.2.6' into maint-0.2.7
2016-01-18 20:00:16 -05:00
teor (Tim Wilson-Brown)
db81565331
Make memwipe() do nothing when passed a NULL pointer or zero size
...
Check size argument to memwipe() for underflow.
Closes bug #18089 . Reported by "gk", patch by "teor".
Bugfix on 0.2.3.25 and 0.2.4.6-alpha (#7352 ),
commit 49dd5ef3
on 7 Nov 2012.
2016-01-18 19:58:07 -05:00
Nick Mathewson
0ace22ef6d
Merge remote-tracking branch 'origin/maint-0.2.7'
2016-01-18 19:52:34 -05:00
Nick Mathewson
83dfcfbc4a
Merge remote-tracking branch 'teor/bug18050' into maint-0.2.7
2016-01-18 19:51:57 -05:00
teor (Tim Wilson-Brown)
6094a886cf
Check ORPort and DirPort reachability before publishing a relay descriptor
...
Otherwise, relays publish a descriptor with DirPort 0 when the DirPort
reachability test takes longer than the ORPort reachability test.
Closes bug #18050 . Reported by "starlight", patch by "teor".
Bugfix on 0.1.0.1-rc, commit a1f1fa6ab
on 27 Feb 2005.
2016-01-18 14:00:29 +11:00
teor (Tim Wilson-Brown)
efd2c9d05b
Fix a display issue in updateFallbackDirs.py output
2016-01-18 12:36:49 +11:00
Nick Mathewson
da4dbb29b7
Fix some leaks in the unit tests.
2016-01-15 11:45:19 -05:00
Nick Mathewson
f6ea7a6258
Make the new directory tests build and run again.
...
Had to disable a couple.
Also add changes file for 17003.
2016-01-15 11:20:14 -05:00
Nick Mathewson
537214d10e
Merge remote-tracking branch 'twstrike/directory-tests'
2016-01-15 11:08:22 -05:00
Nick Mathewson
d3e7803c1c
Changes file for feature 17076
2016-01-15 10:59:28 -05:00
Nick Mathewson
f47d4af04c
Whitespace cleanup
2016-01-15 10:57:03 -05:00
Nick Mathewson
00b13cb091
Merge remote-tracking branch 'twstrike/options_test'
2016-01-15 10:52:27 -05:00
Ola Bini
1722232d78
Update tests to match current changes to options_validate
2016-01-13 10:54:08 -05:00
Ola Bini
6d5215fd19
Move clearing of log messages on advice from @cypherpunks, in order to minimize risk of race conditions leading to another memory leak
2016-01-13 10:35:49 -05:00
Ola Bini
5c1c117b8e
Revert my addition of callback cleaner and instead use existing functionality for temporary log files
2016-01-13 10:35:06 -05:00
Ola Bini
0bfa616e2e
Remove a small memory leak in log callback setup
2016-01-13 10:35:05 -05:00
Ola Bini
ce953b864b
Fix memory leaks
2016-01-13 10:35:05 -05:00
Ola Bini
f2a7a83626
Fix all white space issues
2016-01-13 10:34:24 -05:00