Commit Graph

960 Commits

Author SHA1 Message Date
Neel Chauhan
f81e4aa831 hs-v2: Lookup intro failure cache when picking an intro from descriptor
When picking an intro point from the service descriptor, the client failed to
lookup the failure cache.

It made an HS v2 client re-pick bad intro points for which we already know it
won't work in the first place.

Based on Neel Chauhan original patch.

Fixes #25568

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-30 08:47:21 -04:00
George Kadianakis
4413b98190 Merge branch 'tor-github/pr/1456' 2019-10-29 21:29:13 +08:00
teor
bf16efeb07
nodelist: fix a comment typo in routerset.h 2019-10-28 23:44:08 +10:00
David Goulet
b98631d280 Merge branch 'tor-github/pr/1476' 2019-10-28 08:47:57 -04:00
JeremyRand
56ee42e1c9
Bug 19859: Add HTTPCONNECT client protocol 2019-10-27 05:14:21 +00:00
JeremyRand
23819d3a66
Bug 19859: Set arg to const 2019-10-27 03:06:19 +00:00
JeremyRand
0c4e3b6b50
Bug 19859: Consolidate flag fields into ISO_FIELDS 2019-10-27 01:54:11 +00:00
JeremyRand
2734968e40
Bug 19859: Add stream isolation data to STREAM event 2019-10-27 01:32:21 +00:00
Nick Mathewson
b314b68d61 Fix doxygen HTML warnings in src/feature. 2019-10-26 12:07:09 -04:00
Nick Mathewson
68f8086041 doxygen: add @file declarations for src/feature/
If a file doesn't use the file command (either \file or @file),
Doxygen won't try to process it.
2019-10-26 12:05:28 -04:00
Nick Mathewson
16dffa523e Rename confparse.[ch] identifiers to confmgt.[ch] identifiers.
This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        confparse.h confmgt.h \
        confparse.c confmgt.c \
        CONFPARSE_PRIVATE CONFMGT_PRIVATE \
        TOR_CONFPARSE_H TOR_CONFMGT_H
2019-10-26 10:09:03 -04:00
Nick Mathewson
e7993dc046 Merge branch 'ticket31241_v3' 2019-10-25 08:10:39 -04:00
teor
a91f52a443
Merge branch 'maint-0.4.2' 2019-10-25 10:38:22 +10:00
teor
c8aa3cc17d
Merge remote-tracking branch 'tor-github/pr/1466' into maint-0.4.2 2019-10-25 10:38:01 +10:00
Nick Mathewson
dc6d7f072d Make foo_validate() functions call config_validate().
The former foo_validate() functions are now toplevel
legacy_validate_fn callbacks.  The new foo_validate() functions now
call them.

This change lets us remove the old shared_random disk state
validation callback entirely.
2019-10-24 20:30:32 -04:00
Nick Mathewson
4a248bafba Rename validate_fn{,_t} to start with "legacy_".
The current API of this callback mixes responsibilities, including:
  * validation
  * transition checking
  * processing (modifying) the configuration object.

These will have to be disentangled piece by piece, so for now, we'll
have "legacy" validate functions as well.

This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        validate_fn_t legacy_validate_fn_t \
        validate_fn legacy_validate_fn
2019-10-24 20:30:32 -04:00
Nick Mathewson
27dbf20bf4 Use named-member syntax for initializing config_format_t objects
I'm about to mess with their lists of callbacks, and I don't want to
proliferate lists where we say "NULL, NULL, NULL, ..."
2019-10-24 20:30:32 -04:00
teor
c00602cc34
Merge branch 'maint-0.4.2' 2019-10-25 09:42:14 +10:00
teor
acd27f4b41
Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.4.2 2019-10-25 09:41:48 +10:00
David Goulet
3867ca4925 dir: Return 503 code when rejecting single hop request
Single hop rejection (POST and GET) for HS v3 descriptor now return a 503 code
which is more accurate code from dir-spec.txt and from other rejection case in
the code.

For instance if you are not a relay and you get a POST request, a 503 code is
sent back with a rejection message.

Part of #31958

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24 11:25:05 -04:00
David Goulet
985717675c dir: Remove connection_dir_is_anonymous() logging
First, remove the HSDir mention which should not be in that generic function.
Second, move them to debug() level since they are possible error case.

Part of #31958

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24 11:23:31 -04:00
David Goulet
09468cc58b dir: Look if circuit is closed in connection_dir_is_anonymous()
Before inspecting the p_chan, we must check if the circuit is marked for close
because if it is the case, the channels are nullified from the circuit.

Several valid cases can mark the circuit for close of the directory
connection.

Fixes #31958

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24 11:08:25 -04:00
David Goulet
ed57a04a65 hs-v3: Remove a BUG() caused by an acceptable race
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor
from the client cache with a NEWNYM or simply when the descriptor expires.

Which means that for an INTRO circuit being established during that time, once
it opens, we lookup the descriptor to get the IP object but hey surprised, no
more descriptor.

The approach here is minimalist that is accept the race and close the circuit
since we can not continue. Before that, the circuit would stay opened and the
client wait the SockTimeout.

Fixers #28970.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24 08:50:01 -04:00
teor
20606b8a15
Merge remote-tracking branch 'tor-github/pr/1447' 2019-10-24 10:00:47 +10:00
David Goulet
b6c24eb484 hs-v3: Remove the circuit_established intro flag
Only use the HS circuit map to know if an introduction circuit is established
or not. No need for a flag to keep state of something we already have in the
circuit map. Furthermore, the circuit map gets cleaned up properly so it will
always have the "latest truth".

This commit also removes a unit test that was testing specifically that flag
but now we rely solely on the HS circuit map which is also tested few lines
below the removed test.

Fixes #32094

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-23 11:51:23 -04:00
teor
34509e78c6
Merge remote-tracking branch 'tor-github/pr/1449' 2019-10-23 22:59:16 +10:00
teor
27965f1ef2
Merge remote-tracking branch 'tor-github/pr/1284' into maint-0.3.5 2019-10-23 08:30:48 +10:00
teor
003be727c4
Merge remote-tracking branch 'tor-github/pr/1256' into maint-0.3.5 2019-10-23 08:28:03 +10:00
teor
339c18d6c7
Tidy whitespace around some STMT_BEGINs and STMT_ENDs 2019-10-23 07:37:39 +10:00
Nick Mathewson
6bc2b41e54 config validation: make the "old_options" argument const.
We can't do this with the "options" argument yet, since several
places in the code change those right now.
2019-10-22 14:24:09 -04:00
Nick Mathewson
697d99e504 validate_fn(): remove now-unused defaults and from_setconf.
These arguments were only used by options_validate, and are now
ignored even there.
2019-10-22 13:52:40 -04:00
Nick Mathewson
931a5db2a7 Re-run make autostyle. 2019-10-22 09:40:31 -04:00
Nick Mathewson
b2d487ae22 Merge branch 'ticket31705_v2' into ticket31705_v2_merged
Conflicts:
	src/feature/dirparse/authcert_parse.c
	src/feature/dirparse/ns_parse.c
	src/feature/hs/hs_service.c
	src/lib/conf/conftesting.h
	src/lib/log/log.h
	src/lib/thread/threads.h
	src/test/test_options.c

These conflicts were mostly related to autostyle improvements, with
one or two due to doxygen fixes.
2019-10-22 09:39:06 -04:00
Nick Mathewson
54c5366aa1 feature/control: wrap some problem macros in COCCI 2019-10-22 09:32:13 -04:00
Nick Mathewson
ef5d1e6b65 consdiff disable a macro when running with COCCI 2019-10-22 09:32:13 -04:00
Nick Mathewson
d9bad0203b Disable a couple of iterator macros when COCCI is defined. 2019-10-22 09:32:13 -04:00
Nick Mathewson
b867e97ce6 With COCCI defined, avoid PERIODIC_EVENT.
Coccinelle doesn't understand the particular pattern of token
pasting we have going on here.
2019-10-22 09:32:05 -04:00
Nick Mathewson
630d8c7a1a With coccinelle, avoid includes in the middle of an expression. 2019-10-22 09:24:25 -04:00
Nick Mathewson
2d013bbe5c Merge remote-tracking branch 'tor-github/pr/1417' 2019-10-22 08:36:32 -04:00
Nick Mathewson
8378ad29e6 routermode.h: turn a comment into a doxygen comment. 2019-10-21 12:47:17 -04:00
Nick Mathewson
7dc78aca29 Merge remote-tracking branch 'tor-github/pr/1430' 2019-10-21 12:43:26 -04:00
teor
7a72e71f74
Merge remote-tracking branch 'tor-github/pr/1434' 2019-10-21 15:24:22 +10:00
teor
92fa5239fc
control/getinfo: Use standard error handling
Use BUG() for coding errors, and `< 0` for error checks.

Fix to 31684.
2019-10-21 13:57:02 +10:00
teor
3b2525c375
Fix changes file and string typos
Part of 31684.
2019-10-21 13:56:58 +10:00
AmreshVenugopal
6413b2102f
control: Add GETINFO support for dumping microdesc consensus
- Allows control port to read microdesc consensus using:
GETINFO dir/status-vote/microdesc/consensus

add: Helper function `getinfo_helper_current_consensus`
test: check if GETINFO commands return expected consensus data.

Resolves 31684.
2019-10-21 13:54:55 +10:00
teor
042116e1fd
Merge branch 'maint-0.4.2' 2019-10-20 22:09:00 +10:00
teor
02e3e8eda5
hibernate: Fix repeated "bytes" in comment 2019-10-20 22:08:23 +10:00
teor
475dffee42
dirauth: Add a macro comment to have_module_dirauth() 2019-10-20 20:26:12 +10:00
Roger Dingledine
aab5d90858 Merge branch 'maint-0.4.2' 2019-10-20 05:56:16 -04:00
Roger Dingledine
8b4d7447ae fix easy typos 2019-10-20 05:52:32 -04:00
teor
e2280d6f84
relay: Silence compiler warnings when relay mode is disabled
Part of 32123.
2019-10-20 19:26:55 +10:00
teor
57e86a6d74
relay: Implement HAVE_MODULE_RELAY for routermode.c
Part of 32123.
2019-10-20 19:26:48 +10:00
teor
7944b55ad1 feature: Move proxy_mode() into new files
proxy_mode() was in routermode.[ch], but it's actually a client
mode. Move it into client/proxymode.[ch].

Part of 32123.
2019-10-20 17:52:38 +10:00
Nick Mathewson
7c5716d162 Merge branch 'maint-0.4.2' 2019-10-18 12:27:49 -04:00
Nick Mathewson
57c4af16f0 Merge remote-tracking branch 'tor-github/pr/1396' into maint-0.4.2 2019-10-18 12:27:39 -04:00
teor
d616214e47
Merge branch 'maint-0.4.2' 2019-10-18 12:05:20 +10:00
Alexander Færøy
389b37246e Remove overly strict assertions in transports.c.
This patch removes an overly strict tor_assert() and an ignorable BUG()
expression. Both of these would trigger if a PT was unable to configure
itself during startup. The easy way to trigger this is to configure an
obfs4 bridge where you make the obfs4 process try to bind on a port
number under 1024.

See: https://bugs.torproject.org/31091
2019-10-17 21:33:54 +02:00
David Goulet
52bf54ecd4 hs-v3: Add a series of decoding error code
This commit introduces the hs_desc_decode_status_t enum which aims at having
more fine grained error code when decoding a descriptor.

This will be useful in later commits when we support keeping a descriptor that
can't be decrypted due to missing or bad client authorization creds.

No behavior change.

Part of #30382.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-17 11:31:03 -04:00
David Goulet
8e0d9189c5 hs-v3: Helper function to find all entry connections
No code behavior change. This removes duplicate code that was finding all
entry connections for a specific onion service identity key.

The find_entry_conns() helper function is introduced for that.

Part of #30382

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-17 11:31:03 -04:00
Nick Mathewson
5c09230b45 hs_cache.c: fix HTML tags in doxygen comments. 2019-10-17 08:27:17 -04:00
Nick Mathewson
39cf575ed4 Merge remote-tracking branch 'tor-github/pr/1416' 2019-10-17 08:25:11 -04:00
Nick Mathewson
3430b487d6 hs_cell.[ch]: repair doxygen. 2019-10-16 12:08:38 -04:00
Nick Mathewson
18ea8855f2 shared_random.[ch]: repair doxygen comments 2019-10-16 12:04:53 -04:00
Nick Mathewson
17b88241db hs_cache.[ch]: repair doxygen comments. 2019-10-16 11:57:44 -04:00
Tobias Stoeckmann
d91ad5112e Check tor_vasprintf for error return values.
In case of error, a negative value will be returned or NULL written into
first supplied argument.

This patch uses both cases to comply with style in the specific files.

A tor_vasprintf error in process_vprintf would lead to a NULL dereference
later on in buf_add, because the return value -1 casted to size_t would
pass an assertion check inside of buf_add.

On the other hand, common systems will fail on such an operation, so it
is not a huge difference to a simple assertion. Yet it is better to
properly fail instead of relying on such behaviour on all systems.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2019-10-16 17:56:12 +02:00
Nick Mathewson
1b66668e26 hs_client.[ch]: fix doxygen comments by using /**. 2019-10-16 11:51:47 -04:00
Nick Mathewson
06367299c2 shared_random_state.[ch]: Repair a bunch of doxygen comments
These need to start with /**, not /*.
2019-10-16 11:44:30 -04:00
Nick Mathewson
123fe6bdc5 hs_common.[ch]: repair doxygen comments by replacing /* with /** 2019-10-16 11:39:10 -04:00
Nick Mathewson
2127d797e9 hs_descriptor.[ch]: repair doxygen comments.
These are yet more that were not made with "/**"
2019-10-16 11:33:03 -04:00
Nick Mathewson
ca26ea03fc hs_service.c: repair doxygen comments 2019-10-16 11:26:20 -04:00
Nick Mathewson
0e9e5c37b7 hs_service.h: repair doxygen comments. 2019-10-16 11:18:43 -04:00
Nick Mathewson
ce0739314b voting_schedule: fix doxygen comments to use /**
Previously some of the comments here used /*.
2019-10-16 11:08:34 -04:00
Nick Mathewson
87afe5c260 Rename authcert_members.i to .h, and have it define a macro.
Including a file in the middle of a declaration seems to confuse
Doxygen, and Coccinelle doesn't much like it either.l
2019-10-16 10:53:01 -04:00
Nick Mathewson
98735c40b6 Doxygen: fix warnings about mismatched HTML tags. 2019-10-16 08:27:03 -04:00
Nick Mathewson
5e5e655e32 Doxygen: Fix mismatched filenames.
In 8 places, our \file declarations didn't match the actual files
they were in.
2019-10-16 08:18:26 -04:00
David Goulet
09e6c0f7c7 hs-v3: Fix possible memory leak in error code path
Found by coverity CID 1454769.

There were a second possible leak that is also fixed in this commit.

Fixes #32063

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-15 08:54:11 -04:00
Nick Mathewson
2e5724d153 Merge branch 'ticket31682_042_01_squashed' 2019-10-11 10:21:58 -04:00
Nick Mathewson
46efc0ff35 Correct comment on build_establish_intro_dos_extension 2019-10-11 10:21:45 -04:00
David Goulet
b356b3907a hs-v3: Fix implicit ssize_t to size_t conversion
Found by Coverity.

Fixes #31682

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-11 10:20:36 -04:00
David Goulet
f50de3a918 hs-v3: Do not remove intro point if circuit exists
When considering introduction point of a service's descriptor, do not remove
an intro point that has an established or pending circuit.

Fixes #31652

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-08 17:02:47 -04:00
Nick Mathewson
7a26f14a37 Merge remote-tracking branch 'tor-github/pr/1317' 2019-10-07 10:23:44 -04:00
Nick Mathewson
56e8d84ea3 Merge branch 'ticket31548_035_01_squashed' 2019-10-07 10:21:40 -04:00
David Goulet
984a28f3e5 hs-v3: Make service pick the exact amount of intro points
When encoding introduction points, we were not checking if that intro points
had an established circuit.

When botting up, the service will pick, by default, 3 + 2 intro points and the
first 3 that establish, we use them and upload the descriptor.

However, the intro point is removed from the service descriptor list only when
the circuit has opened and we see that we have already enough intro points, it
is then removed.

But it is possible that the service establishes 3 intro points successfully
before the other(s) have even opened yet.

This lead to the service encoding extra intro points in the descriptor even
though the circuit is not opened or might never establish (#31561).

Fixes #31548

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-07 10:20:09 -04:00
David Goulet
52b7ae71b3 hs: ADD_ONION NEW:BEST now defaults to ED25519-V3
From RSA1024 (v2) to v3 now.

Closes #29669

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-03 15:43:03 -04:00
George Kadianakis
3778b97cab Merge branch 'tor-github/pr/1276' 2019-10-03 19:13:02 +03:00
Nick Mathewson
4d4e2abd2f Authorities reject relays running unsupported Tor release series.
Our minimum version is now 0.2.9.5-alpha.  Series 0.3.0, 0.3.1,
0.3.2, 0.3.3, and 0.3.4 are now rejected.

Also, extract this version-checking code into a new function, so we
can test it.

Closes ticket 31549.

Also reject 0.3.5.0 through 0.3.5.6-rc as unstable.
2019-10-03 19:12:46 +03:00
Nick Mathewson
5fd137c482 Merge remote-tracking branch 'tor-github/pr/1358' 2019-10-03 09:11:49 -04:00
Nick Mathewson
de7fcae72a Merge remote-tracking branch 'tor-github/pr/1382' 2019-10-03 09:08:23 -04:00
teor
3d17fafa04
control/control: Refactor some error handling code
Split some protocol error handling out of
connection_control_process_inbuf().

This refactor reduces the size of a practracker exception.

Closes 31840.
2019-10-03 11:35:42 +10:00
Nick Mathewson
39640728c3 Add comments to try to prevent recurrence of #31495.
There is a bad design choice in two of our configuration types,
where the empty string encodes a value that is not the same as the
default value.  This design choice, plus an implementation mistake,
meant that config_dup() did not preserve the value of routerset_t,
and thereby caused bug #31495.

This comment-only patch documents the two types with the problem,
and suggests that implementors try to avoid it in the future.

Closes ticket 31907.
2019-10-01 09:45:12 -04:00
George Kadianakis
e8e42f4af9 Help users who try to use v2 client auth in v3 onions. 2019-10-01 13:41:21 +03:00
Nick Mathewson
53116ca0b7 Re-run "make autostyle" with improved annotate_ifdef_directives 2019-09-30 08:57:37 -04:00
George Kadianakis
9318682109 Merge branch 'tor-github/pr/1346' 2019-09-30 13:56:51 +03:00
Nick Mathewson
ffd857bbe1 Merge remote-tracking branch 'tor-github/pr/1308' 2019-09-26 14:36:37 -04:00
teor
d1eab05834
lock: Avoid some undefined behaviour when freeing mutexes.
Fixes bug 31736; bugfix on 0.0.7.
2019-09-26 12:37:25 +10:00
George Kadianakis
0a77e5f1c2 Merge branch 'tor-github/pr/1341' 2019-09-25 14:18:15 +03:00
George Kadianakis
2199629648 Merge branch 'tor-github/pr/1345' 2019-09-25 14:14:30 +03:00
George Kadianakis
99f75373de Merge branch 'tor-github/pr/1309' 2019-09-25 14:12:42 +03:00
teor
0cb57a4908
feature/control: add a missing word to the send_control_done() comment 2019-09-24 15:08:37 +10:00
Roger Dingledine
e1429d9148 fix typo in comment 2019-09-23 18:32:05 -04:00
AmreshVenugopal
3e45260594 fix: Ticket #31589
- The function `decrypt_desc_layer` has a cleaner interface.
- `is_superencrypted_layer` changed from `int` -> `bool`

[ticket details](https://trac.torproject.org/projects/tor/ticket/31589)

add(changes/*): changes file
fix(src/features/hs): is_superencrypted changed from `int` -> `bool`
fix(changes/ticket31589): header
add(changes/ticket31589): subsystem(onion services) to change
2019-09-23 23:52:01 +05:30
Nick Mathewson
c309169217 microdesc_parse: convert some ints to bools
Noted by ahf during review of #31675
2019-09-19 14:37:24 -04:00
Nick Mathewson
194884977c microdesc_parse: Rename "next" label to "err". 2019-09-19 14:37:24 -04:00
Nick Mathewson
2094796c24 Reindent microdesc_parse_fields().
I suggest reviewing this with -b: it should be whitespace-only.
2019-09-19 14:37:24 -04:00
Nick Mathewson
ec368409fa Extract field-parsing code for microdesc_parse.c
The code here parses the fields from the microdescriptor, including
possible annotations, and stores them into a microdesc_t object.

This commit is almost pure code movement; I recommend using
--color-moved to review it.
2019-09-19 14:37:24 -04:00
Nick Mathewson
b1552e8814 Reindent microdesc_extract_body().
This commit is whitespace-only; I suggest reviewing with -b.
2019-09-19 14:37:24 -04:00
Nick Mathewson
9cbc166ea0 Extract the body-copying portion of microdesc parsing
This code is logically independent of the rest of the function, and
goes better in its own function.

This is almost purely code movement; I suggest reviewing with
--color-moved.
2019-09-19 14:37:24 -04:00
teor
03c2b1be8d
dirauth: reorder the checks in dirserv_router_has_valid_address()
To avoid a bug warning.

Fixes 31793. Bug not in any release, no changes file required.
2019-09-19 16:19:12 +10:00
Nick Mathewson
4bbefc2aac Merge branch 'bug30916_035' into bug30916_041 2019-09-18 11:19:41 -04:00
Nick Mathewson
2da4d64a64 Avoid a crash if our "current" and "old" ntor onion keys are equal
Our dimap code asserts if you try to add the same key twice; this
can't happen if everything is running smoothly, but it's possible if
you try to start a relay where secret_onion_key_ntor is the same as
secret_onion_key_ntor.old.

Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were
introduced.
2019-09-18 11:14:45 -04:00
Nick Mathewson
1e9488f2fd Extract expressions in construct_ntor_key_map()
No behavioral change here: this is just refactoring.
2019-09-18 11:12:43 -04:00
Nick Mathewson
d6d3e829dd Merge branch 'maint-0.4.1' 2019-09-18 08:07:56 -04:00
Nick Mathewson
70bcff6010 Merge branch 'bug31772_041' into maint-0.4.1 2019-09-18 08:07:50 -04:00
Nick Mathewson
5f00c03ed0 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 21:28:38 -04:00
Nick Mathewson
9e674d0eb4 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-09-17 21:28:37 -04:00
Nick Mathewson
25af8ada30 Correct the syntax description for the MAPADDRESS command.
In 0.4.1.1-alpha I introduced a bug where we would require and
ignore a single positional argument.

Fixes bug 31772.
2019-09-17 19:26:45 -04:00
Nick Mathewson
ab74c3560a Merge branch 'ticket31552_041' into maint-0.4.1 2019-09-17 18:54:05 -04:00
Nick Mathewson
68a0106bf3 Run "make autostyle" and fix wide lines. 2019-09-16 13:27:42 -04:00
George Kadianakis
a1192b6b4a Merge branch 'tor-github/pr/1273' 2019-09-16 15:20:25 +03:00
David Goulet
286b129b09 Merge branch 'tor-github/pr/1319' 2019-09-12 13:53:59 -04:00
Nick Mathewson
87944cecfc Merge remote-tracking branch 'tor-github/pr/1300' 2019-09-12 08:50:09 -04:00
Nick Mathewson
a90d1918af Update #includes to point to confparse.h in its new location.
This commit was automatically generated by running
scripts/maint/rectify_include_paths.py .
2019-09-11 10:17:20 -04:00
Nick Mathewson
e7d7e04155 Do not look inside bogus microdesc when listing its digest as invalid
We have code in microdescs_parse_from_string() to record the digests
of microdescriptors that we could not parse.  But right now, that
code looks at the md->digest field, which is a bit inelegant, and
will stand in the way of sensible refactoring.

Instead, use a local variable to hold the digest.
2019-09-10 09:10:49 -04:00
Nick Mathewson
7282213bd3 Extract saved_location_to_string() from microdesc parsing.
We may be able to use this function in other places in the future;
if so, we should move it to somewhere more useful.

Part of 31675.
2019-09-10 09:10:49 -04:00
Nick Mathewson
a642a4cbd7 Merge branch 'ticket30924_042_04_squashed' into ticket30924_042_04_squashed_merged 2019-09-09 11:10:53 -04:00
David Goulet
622c2c7884 hs-v3: Rename validation function in hs_intropoint.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-09-09 11:07:51 -04:00
David Goulet
385f6bcfcc hs-v3: Move DoS parameter check against 0
Move it outside of the validation function since 0 is a valid value but
disables defenses.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-09-09 11:07:36 -04:00
teor
670d402621 entrynodes: Make routine descriptor expiry notice logs less alarming
When tor is missing descriptors for some primary entry guards, make the
log message less alarming. It's normal for descriptors to expire, as long
as tor fetches new ones soon after.

Fixes bug 31657; bugfix on 0.3.3.1-alpha.
2019-09-06 16:43:14 +10:00
George Kadianakis
c750ec20ab Merge branch 'tor-github/pr/1291' 2019-09-05 17:09:20 +03:00
George Kadianakis
cdd7e88970 Merge branch 'tor-github/pr/1261' 2019-09-05 17:02:53 +03:00
Neel Chauhan
be4a60945d Check IPv6 exit policies on microdescriptors in node_exit_policy_rejects_all() 2019-09-05 17:02:45 +03:00
Nick Mathewson
ec724fe8c8 rendclient: use ptrdiff, not off_t, for offset of DH field.
The off_t type is only useful for offsets on the filesystem.  For
in-memory offsets, use ptrdiff_t.
2019-09-04 12:06:27 -04:00
David Goulet
34f3fcef40 Merge branch 'tor-github/pr/1290' 2019-09-04 10:33:49 -04:00
Nick Mathewson
46a3820652 Merge remote-tracking branch 'tor-github/pr/1270' 2019-09-04 09:52:35 -04:00
Nick Mathewson
17a870a64b Merge branch 'ticket31240v2_merged_2' into ticket31240v2_merged_2_merged 2019-09-04 08:41:42 -04:00
George Kadianakis
7fa624537c Merge branch 'tor-github/pr/1269' 2019-09-03 17:11:25 +03:00
Nick Mathewson
a617001fd4 Merge remote-tracking branch 'tor-github/pr/1279' 2019-09-03 09:47:25 -04:00
Nick Mathewson
01bda9bed1 Merge branch 'maint-0.4.1' 2019-09-02 14:11:32 -04:00
Nick Mathewson
e3a458e441 Merge branch 'ticket12399_035' into maint-0.4.1 2019-09-02 14:11:18 -04:00
rl1987
05fa1689eb Change loglevel of message 'Hash of session info was not as expected' 2019-09-02 14:09:39 -04:00
Neel Chauhan
d22ed05dc0 Space out the arguments to the cell functions in rend_process_relay_cell() 2019-08-30 18:58:00 -04:00
teor
a52a5e0099
Merge branch 'maint-0.3.5' into maint-0.4.0 2019-08-30 23:33:01 +10:00
teor
1132dc9f75
Merge remote-tracking branch 'tor-github/pr/1181' into maint-0.3.5 2019-08-30 23:24:05 +10:00
teor
b66712d85b
Merge remote-tracking branch 'tor-github/pr/1117' into maint-0.3.5 2019-08-30 23:22:18 +10:00
Nick Mathewson
fb0e8966f0 Stub more functions in dirvote headers to fix more of 31552. 2019-08-29 11:18:42 -04:00
Nick Mathewson
4256ee0d37 Stub out some more functions in dirvote/*.h, fix compilation.
This fixes LTO compilation for Android and -O0 compilation in
general, when --disable-module-dirauth is provided.

Fixes bug 31552; bugfix on 0.4.1.1-alpha.
2019-08-29 09:50:38 -04:00
David Goulet
960d989415 Merge branch 'tor-github/pr/1257' 2019-08-29 08:56:04 -04:00
David Goulet
7c99a4ddde Merge branch 'maint-0.4.1' 2019-08-29 08:55:58 -04:00
David Goulet
ff905f8e1e Merge branch 'tor-github/pr/1256' into maint-0.4.1 2019-08-29 08:55:31 -04:00
David Goulet
337b733cfc Merge branch 'tor-github/pr/1255' into maint-0.4.1 2019-08-29 08:55:27 -04:00