Nick Mathewson
1743dac078
Minimize headers that include crypto_formats and x25519 stuff
2018-07-01 15:20:37 -04:00
Nick Mathewson
471104eaa5
Remove needless includes from or.h
...
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.
2018-07-01 15:20:37 -04:00
Nick Mathewson
e0957022bd
Extract get_uname to lib/osinfo.
2018-06-29 12:21:52 -04:00
Nick Mathewson
accf239fa3
Rectify include paths (automated)
2018-06-21 13:19:00 -04:00
Nick Mathewson
0dab29ce10
Run rectify_include_paths.py
2018-06-20 09:35:05 -04:00
Nick Mathewson
fb0019daf9
Update copyrights to 2018.
2018-06-20 08:13:28 -04:00
Nick Mathewson
3191ba389d
Move extend_info_t into its own header.
2018-06-15 15:37:05 -04:00
Nick Mathewson
ed0731c7de
Extract routerinfo_t into its own header.
...
I was expecting this to be much worse.
2018-06-15 14:49:46 -04:00
Nick Mathewson
00f1d1653e
Extract extrainfo_t into its own header
2018-06-15 14:21:25 -04:00
Nick Mathewson
1e4e9db815
Extract authority_cert_t into its own header
2018-06-15 14:14:11 -04:00
Nick Mathewson
d2942d127d
Extract node_t into its own header.
2018-06-15 13:13:33 -04:00
Nick Mathewson
b3f2c682b7
Extract crypt_path_t and relay_crypto_t into their own headers
2018-06-15 11:52:32 -04:00
Nick Mathewson
a0bc164af5
Extract {or,origin}_circuit_t into their own headers
2018-06-15 11:34:33 -04:00
Nick Mathewson
1416f54d1e
Split dir_connection_t into its own header
2018-06-15 10:31:21 -04:00
Nick Mathewson
2a574d11ac
Move dir_server_t into its own header.
2018-06-14 16:58:01 -04:00
Nick Mathewson
df9a3fe86f
Make server_port_cfg_t and port_cfg_t into separate headers.
2018-06-14 16:48:15 -04:00
Nick Mathewson
76e9de7c6d
Merge branch 'maint-0.3.3'
2018-06-13 09:57:10 -04:00
Nick Mathewson
1c80eb92fa
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-06-13 09:57:10 -04:00
Nick Mathewson
faf4580061
Several attempts to diagnose ticket 25686
...
There are a few reasons that relays might be uploading desciptors
without saying X-Desc-Gen-Reason:
1. They are running an old version of our software, before 0.3.2.stable.
2. They are not running our software, but they are claiming they
are.
3. They are uploading through a proxy that strips X-Desc-Gen-Reason.
4. They somehow had a bug in their software.
According to the 25686 data, 1 is the most common reason. This
ticket is an attempt to diagnose case 4, or prove that case 4
doesn't actually happen.
2018-06-11 16:24:00 -04:00
Nick Mathewson
a9ef335c1b
Use router_get_my_routerinfo_with_err to implement the old version
...
Having one function implemented in terms of the other should keep
them from diverging.
follow-up on #25852
2018-05-14 14:12:36 -04:00
Nick Mathewson
d27fd7ff6b
Merge remote-tracking branch 'rl1987/bug25852_take2'
2018-05-14 14:05:50 -04:00
rl1987
036df13a03
Tweak error handling for #25852
2018-05-10 16:45:57 +03:00
rl1987
8ad97b7dcf
Avoid confusion with errno from libc
2018-05-10 16:33:08 +03:00
rl1987
36f7d0a940
Make _with_err return routerinfo, like old function does
2018-05-10 16:13:16 +03:00
Nick Mathewson
7595eae52a
Add a new net_is_completely_disabled() function
2018-05-09 12:21:08 -04:00
Nick Mathewson
c0feb698a0
Comment-only fix: annotate we_are_hibernating() usage
...
Everywhere we use we_are_hibernating(), remind the reader what it
means.
(Also, add an XXXX to note a DisableNetwork usage to change later.)
2018-05-09 12:18:39 -04:00
rl1987
b00d17aa9e
Improve GETCONF exit-policy/* error handling
...
This will yield different error codes for transient and permament
errors. Furthermore, Tor will give human readable error
messages to controller.
2018-05-05 16:12:00 +02:00
Nick Mathewson
c3b7258370
Merge remote-tracking branch 'isis/bug24660_r1'
2018-05-03 13:50:18 -04:00
David Goulet
1f739e9b06
dirauth: Move authdir_mode_v3() to module
...
This function must return false if the module is not compiled in. In order to
do that, we move the authdir_mode_v3() function out of router.c and into the
dirauth module new header file named mode.h.
It is always returning false if we don't have the module.
Closes #25990
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-02 13:42:24 -04:00
Nick Mathewson
58f54a3588
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-04-25 08:01:54 -04:00
Nick Mathewson
a052eea480
Merge branch 'maint-0.3.3'
2018-04-25 08:01:54 -04:00
Nick Mathewson
7c3f87eb4b
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-04-25 08:01:53 -04:00
Nick Mathewson
bb35405d2a
Fix a copy-paste error in the fix for #23693 .
...
Found by coverity; CID 25912; bug not in any released Tor.
2018-04-25 08:00:55 -04:00
Nick Mathewson
9be7608fda
Merge branch 'maint-0.3.3'
2018-04-24 08:51:58 -04:00
Nick Mathewson
6182f60f75
Merge branch 'maint-0.3.2' into maint-0.3.3
2018-04-24 08:51:55 -04:00
Nick Mathewson
d2951b381b
Merge branch 'maint-0.3.1' into maint-0.3.2
2018-04-24 08:49:24 -04:00
Nick Mathewson
c3e40a8361
Allow cpuworkers to exist without onion keys
...
Now that we allow cpuworkers for dirport-only hosts (to fix 23693),
we need to allow dup_onion_keys() to succeed for them.
The change to construct_ntor_key_map() is for correctness,
but is not strictly necessary.
2018-04-22 17:17:07 -04:00
Isis Lovecruft
fe3aca1491
crypto: Refactor (P)RNG functionality into new crypto_rand module.
...
* ADD new /src/common/crypto_rand.[ch] module.
* ADD new /src/common/crypto_util.[ch] module (contains the memwipe()
function, since all crypto_* modules need this).
* FIXES part of #24658 : https://bugs.torproject.org/24658
2018-04-06 21:45:28 +00:00
Caio Valente
8775c93a99
Refactor: suppress duplicated functions from router.c and encapsulate NODE_DESC_BUF_LEN constant.
...
Also encapsulates format_node_description().
Closes ticket 25432.
2018-03-06 20:42:32 +01:00
Nick Mathewson
d9804691df
Merge remote-tracking branch 'ffmancera-1/bug18918'
2018-02-15 21:00:10 -05:00
Fernando Fernandez Mancera
3dd2c1d022
Tweaks into router_should_be_dirserver() log msg.
...
Fixed log message that has been changed in commit 5ea993fa5a
.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-02-12 12:30:52 +01:00
Caio Valente
a4c8531260
refactor: using get_uptime() (and reset_uptime()) consistently.
...
Using get_uptime() and reset_uptime() instead of
accessing stats_n_seconds_working directly.
stats_n_seconds_working is not extern anymore.
Ticket #25081
2018-01-31 02:36:38 +01:00
Fernando Fernandez Mancera
5ea993fa5a
Clarify directory and ORPort checking functions.
...
In order to make the OR and dir checking functions in router.c less confusing
we renamed some functions and splitted consider_testing_reachability() into
router_should_check_reachability() and router_do_reachability_checks(). Also we
improved the documentation.
Fixes #18918 .
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-01-24 20:19:24 +01:00
Nick Mathewson
04524443d0
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-12-11 16:54:14 -05:00
Nick Mathewson
2ea573ece8
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-12-11 16:54:14 -05:00
Nick Mathewson
eaaa1108a3
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-12-11 16:54:14 -05:00
Nick Mathewson
bc1ea4f470
Merge branch 'maint-0.2.5' into maint-0.2.8
2017-12-11 16:54:11 -05:00
Nick Mathewson
5ee0cccd49
Merge branch 'macro_free_v2_squashed'
2017-12-08 14:58:43 -05:00
Nick Mathewson
176ad729d9
Change the free macro convention in the rest of src/or/*.h
2017-12-08 14:47:19 -05:00
Nick Mathewson
a7a0cebb59
Merge branch 'more_directories_squashed'
2017-12-05 19:49:45 -05:00