Nick Mathewson
d893be190f
rectify include paths (automatic) for address.h
2018-06-27 09:13:04 -04:00
Nick Mathewson
0dab29ce10
Run rectify_include_paths.py
2018-06-20 09:35:05 -04:00
Nick Mathewson
d7301a456a
Merge remote-tracking branch 'neel/b25886c'
2018-06-20 08:32:34 -04:00
Nick Mathewson
fb0019daf9
Update copyrights to 2018.
2018-06-20 08:13:28 -04:00
Nick Mathewson
11a76b903b
Merge branch 'maint-0.3.4'
2018-06-20 08:05:07 -04:00
George Kadianakis
b7b7dab00d
Recreate nodelist before use if it's outdated.
...
We currently only do the check when we are about to use the HSDir indices.
2018-06-20 08:01:02 -04:00
Neel Chauhan
9d7f148885
Make frac_nodes_with_descriptors() take and use for_direct_connect
2018-06-16 11:27:28 -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
9d6276bca8
Extract microdesc_t into its own header.
2018-06-15 14:38:30 -04:00
Nick Mathewson
def1f20e1f
Extract routerstatus_t into its own header.
2018-06-15 14:33:03 -04:00
Nick Mathewson
b8ae4111e3
Extract desc_store_t and routerlist_t into their own headers.
2018-06-15 14:07:17 -04:00
Nick Mathewson
50369f8981
Extract networkstatus_t and ..sr_info_t into their own headers
2018-06-15 13:45:15 -04:00
Nick Mathewson
f901ca958a
fixup! Extract node_t into its own header.
2018-06-15 13:23:44 -04:00
Nick Mathewson
d2942d127d
Extract node_t into its own header.
2018-06-15 13:13:33 -04:00
Nick Mathewson
2a574d11ac
Move dir_server_t into its own header.
2018-06-14 16:58:01 -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
Neel Chauhan
bfe5a739b7
Make hsdir_index in node_t a hsdir_index_t rather than a pointer.
2018-04-28 20:35:30 -04:00
Nick Mathewson
6773102c92
Merge branch 'bug25691_033_again_squashed'
2018-04-22 19:44:27 -04:00
Nick Mathewson
47163780c3
Rename node_has_descriptor() to node_has_any_descriptor()
...
Changing the name of this function should help keep us from misusing
it when node_has_preferred_descriptor() would be more appropriate.
2018-04-22 19:43:07 -04:00
Nick Mathewson
948dd2c79e
Check for "the right descriptor", not just "any descriptor".
...
This patch adds a new node_has_preferred_descriptor() function, and
replaces most users of node_has_descriptor() with it. That's an
important change, since as of d1874b4339
(our fix for #25213 ),
we are willing to say that a node has _some_ descriptor, but not the
_right_ descriptor for a particular use case.
Part of a fix for 25691 and 25692.
2018-04-22 19:42:26 -04:00
Nick Mathewson
1abe0a5769
Add an initialization case to node_get_prim_dirport
...
Fixes a bug found by scan-build; bugfix on c2fa743806
. Bug not in
any released Tor.
2018-04-17 19:43:14 -04:00
Nick Mathewson
31a450a5b6
Add a redundant memset to node_get_pref_ipv6_orport()
...
For whatever reason, clang's scan-build isn't sure that this
function actually initializes its output.
2018-04-17 19:41:10 -04:00
Nick Mathewson
794a25f8c1
Merge branch 'maint-0.3.3'
2018-03-28 14:23:06 -04:00
Nick Mathewson
e0bbef48bf
Merge remote-tracking branch 'dgoulet/bug24767_033_03' into maint-0.3.3
2018-03-28 14:21:04 -04:00
Nick Mathewson
fa6eaab83e
Merge branch 'maint-0.3.3'
2018-03-27 18:25:52 -04:00
Taylor Yu
471f28a2a8
Fix CID 1430932
...
Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist. Fixes bug 25629.
2018-03-27 16:11:29 -05:00
George Kadianakis
ab16f1e2a1
test: Add unittest for the OR connection failure cache
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-03-27 12:43:39 -04:00
Neel Chauhan
c2fa743806
Remove the return value of node_get_prim_orport() and node_get_prim_dirport()
2018-02-16 08:20:33 -05:00
Nick Mathewson
abdf2a6f7f
Merge remote-tracking branch 'dgoulet/ticket24902_029_05'
2018-02-09 12:08:12 -05:00
David Goulet
a445327b80
test: Add unit tests for addressset.c
...
This also adds one that tests the integration with the nodelist.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-08 16:56:05 -05:00
Nick Mathewson
6892d32921
Add an address_set to the nodelist.
...
This set is rebuilt whenever a consensus arrives. In between
consensuses, it is add-only.
2018-02-08 14:40:05 -05:00
Nick Mathewson
c2757c3774
Remove nodelist_recompute_all_hsdir_indices() as unused.
...
Closes 25108.
2018-02-01 08:44:47 -05:00
Nick Mathewson
7e504515b3
Always look at the subprotocol versions summary flags
...
Previously, we wouldn't do this when running with a routerinfo_t in
some cases, leading to many needless calls to the protover module.
This change also cleans up the code in nodelist.c a bit.
Fixes bug 25008; bugfix on 0.2.9.4-alpha.
2018-01-24 13:53:56 -05:00
Nick Mathewson
d9fbd34f42
Extract protover summary flags into a new structure
...
This will let us use them on routerinfo_t as well as on
routerstatus_t, and save some time on relays.
No behavioral changes here.
2018-01-24 13:53:55 -05:00
Nick Mathewson
d8c0c62c7b
Remove needless parentheses
2018-01-10 09:39:13 -05:00
Nick Mathewson
4715d81809
Merge remote-tracking branch 'teor/Bug-23966'
2018-01-10 09:38:38 -05:00
ArunaMaurya221B
01efbe3bd3
node_has_curve25519_onion_key() is refactored and duplicate code removed
2017-12-29 20:11:06 +05:30
teor
53f350182e
Expand comments in node_get_ed25519_id() and put them near the relevant code
...
And add a changes file.
Follow-up to 24001.
2017-12-24 19:50:47 +11:00
ArunaMaurya221B
5865e56ec0
Conditional check added
2017-12-24 19:43:57 +11:00
Nick Mathewson
fa0d24286b
Convert remaining function (mostly static) to new free style
2017-12-08 14:47:19 -05:00
Nick Mathewson
a5ef2b619d
Make node_get_curve25519_onion_key() return a const ptr
2017-11-12 17:07:16 -05:00
Nick Mathewson
f92736517b
Merge branch 'bug23577_squashed'
2017-11-12 17:05:39 -05:00
Neel Chauhan
0ee50a414c
Introduce node_get_curve25519_onion_key()
2017-11-12 17:05:25 -05:00
Nick Mathewson
0626031564
Merge branch 'ticket20895'
2017-11-09 09:17:53 -05:00
David Goulet
0386280487
nodelist: Downgrade warning to protocol warning
...
The node_get_ed25519_id() warning can actually be triggered by a relay flagged
with NoEdConsensus so instead of triggering a warning on all relays of the
network, downgrade it to protocol warning.
Fixes #24025
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-02 10:33:57 -04:00
Nick Mathewson
3d93ec3ef4
Merge branch 'bug23762_032_02_squashed' into maint-0.3.2
2017-10-31 12:14:21 -04:00
David Goulet
5dbcd48f0e
hs-v3: Attempt descriptor refetch when dirinfo changes
...
When the directory information changes, callback to the HS client subsystem so
it can check if any pending SOCKS connections are waiting for a descriptor. If
yes, attempt a refetch for those.
Fixes #23762
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-10-31 12:14:11 -04:00
Nick Mathewson
b1d6cf2508
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-10-23 15:55:48 -04:00
Nick Mathewson
f0a6ea0bfd
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-10-23 15:55:48 -04:00
Nick Mathewson
9ae4ffc076
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-10-23 15:55:08 -04:00