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
ba44423cfc
address_set.c: doxygen comment repair.
2019-10-16 11:15:25 -04:00
Nick Mathewson
a54c98007a
channel.h: fix various doxygen warnings
...
There were a bunch of items where the doxygen comments were
formatted incorrectly (with /* instead of /**)
2019-10-16 11:11: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
f9fac733b9
Doxygen: Fix things that looked like links.
...
Doxygen thinks that saying #foo is linking to a "foo" anchor
someplace.
2019-10-16 08:44:35 -04:00
Nick Mathewson
591420df20
Doxygen: fix unrecognized commands.
...
Doxygen seems to interpret anything starting with \ as a command,
even when we don't mean it that way.
2019-10-16 08:39:41 -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
6bbeb08f92
Merge branch 'maint-0.4.2'
2019-10-14 15:55:27 -04:00
Nick Mathewson
eebd2d44a1
Merge remote-tracking branch 'tor-github/pr/1393' into maint-0.4.2
2019-10-14 15:55:13 -04:00
Nick Mathewson
9201bbd96c
Replace a unicode character which doxygen cannot handle.
...
Merging without review, as this is an editorial fix in a comment.
2019-10-14 14:05:50 -04:00
Nick Mathewson
61fe3f448c
Bump master to 0.4.3.0-alpha-dev.
2019-10-11 17:15:04 -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
Nick Mathewson
0d82a8be77
Merge remote-tracking branch 'tor-github/pr/1394'
2019-10-09 16:44:12 -04:00
Nick Mathewson
ab064cf762
Merge remote-tracking branch 'tor-github/pr/1399'
2019-10-09 16:37:47 -04:00
Nick Mathewson
755f001600
Merge remote-tracking branch 'tor-github/pr/1401'
2019-10-09 16:29:46 -04:00
Nick Mathewson
99809834a7
Merge branch 'bug30344_squashed_035'
2019-10-09 16:26:31 -04:00
George Kadianakis
841cff6e4f
Stop libevent from reading data from closed connections.
...
Code adapted from Rob's proposed patch in #30344 .
Also add a comment in connection_mark_for_close_internal_() on why we should
not be adding extra code there without a very good reason.
2019-10-09 16:24:49 -04:00
Neel Chauhan
7c1b2fceb7
test: New behavior on IP retry for HSv3
...
Unit test for #31652 where if we are over the retry limit for the IP but we
have an established circuit, we don't remove the IP.
Part of #31652
2019-10-08 17:02:47 -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
911b16e6e7
config.c: make a couple of arguments const.
...
These functions do not modify their inputs, so they can take const
arguments.
2019-10-08 12:59:22 -04:00
Nick Mathewson
bd5ce112c9
Use C99 struct-initializer syntax in COMMANDLINE_ONLY_OPTIONS
...
I'm about to add more fields to this table, and this syntax change
will make it easier to do so.
2019-10-08 12:59:22 -04:00
Nick Mathewson
6cea2bd498
Document takes_argument_t and its members.
2019-10-08 12:59:22 -04:00
Nick Mathewson
4c25ea6703
Rename TAKES_NO_ARGUMENT to ARGUMENT_NONE.
...
I'm doing this for consistency, so that all the values for this enum
have the same prefix.
This is an automated commit, generated by the following shell commands:
for fn in $(git ls-tree --name-only -r HEAD src |grep '\.[ch]$'); do \
perl -i -pe 's!\bTAKES_NO_ARGUMENT\b!ARGUMENT_NONE!g;' "$fn"; \
done
2019-10-08 12:59:22 -04:00
Nick Mathewson
c42a79499a
Extract the enumeration that tells Tor what command it is running.
2019-10-08 12:59:18 -04:00
George Kadianakis
081bd37315
Fix flapping of test_service_intro_point() unittest.
2019-10-08 19:00:43 +03: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
Nick Mathewson
58b87a2c59
Merge remote-tracking branch 'tor-github/pr/1379'
2019-10-07 10:15:46 -04:00
Nick Mathewson
5fb5019a94
bump to 0.4.2.2-alpha-dev
2019-10-07 09:32:26 -04:00
Nick Mathewson
fdfb4b196b
Use {mock,unmock}_hostname_resolver() in relevant tests
...
These tests all invoke the hostname resolver in one way or another,
and therefore potentially block if our DNS server is missing,
absent, or extremely slow. Closes ticket 31841.
2019-10-04 08:03:19 -04:00
Nick Mathewson
4a0749596c
Add a mock replacement for blocking hostname resolution
...
Based on examination of our tests, this mock function accepts
"localhost" and "torproject.org", and rejects everything else.
2019-10-04 08:03:19 -04:00
Nick Mathewson
9c24ceeb3f
Make tor_addr_lookup_host_impl mockable.
2019-10-04 08:02:56 -04:00
teor
ff304f3be7
tls: Log TLS read buffer length bugs once
...
Rather than filling the logs with similar warnings.
Fixes bug 31939; bugfix on 0.3.0.4-rc.
2019-10-04 12:33:34 +10:00
teor
e5b8bd38ab
Merge remote-tracking branch 'tor-github/pr/1392'
2019-10-04 11:26:43 +10:00
Nick Mathewson
9b73088c14
util/map_anon_nofork: Add a cast to avoid passing -48 to memset
...
This fixes coverity CID 1454593, and bug 31948. Bug not in any
released version of Tor.
2019-10-04 11:22:43 +10: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
9309eaf8ea
Merge branch 'tor-github/pr/1377'
2019-10-03 19:13:57 +03:00
George Kadianakis
3778b97cab
Merge branch 'tor-github/pr/1276'
2019-10-03 19:13:02 +03:00
Nick Mathewson
49d6990cae
Unit tests for dirserv_reject_tor_version().
2019-10-03 19:12:52 +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