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
Nick Mathewson
76939cf293
Bump to 0.4.2.3-alpha
2019-10-23 20:25:34 -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
8bc65cda44
Merge branch 'pr1450_squashed' into maint-0.4.1
2019-10-23 09:58:22 +10:00
Nick Mathewson
f3c0a0b9fe
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-23 09:57:51 +10:00
teor
57acdaa3f1
Merge branch 'maint-0.3.5' into maint-0.4.0
2019-10-23 08:47:08 +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
7660a7cf7d
Merge remote-tracking branch 'tor-github/pr/1178' into maint-0.2.9
2019-10-23 08:20:45 +10:00
teor
339c18d6c7
Tidy whitespace around some STMT_BEGINs and STMT_ENDs
2019-10-23 07:37:39 +10:00
Nick Mathewson
1cdc030c3d
Merge branch 'maint-0.4.2'
2019-10-22 14:47:28 -04:00
Nick Mathewson
2ed194c9a9
Merge remote-tracking branch 'tor-github/pr/1441' into maint-0.4.2
2019-10-22 14:46:10 -04: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
3656fdae98
test_options: remove def_opt member of test data.
2019-10-22 14:24:09 -04:00
Nick Mathewson
86a1d670ac
test_options: remove "dflt" part of setup_options().
...
It is no longer used anywhere.
2019-10-22 14:24:09 -04:00
Nick Mathewson
475a1dc9be
Remove a pair of now-unused default-options arguments.
2019-10-22 14:24:03 -04:00
Nick Mathewson
3dc0944acd
test_options: Fix options_validate() calls in macros.
...
Coccinelle missed these.
2019-10-22 14:24:03 -04:00
Nick Mathewson
41e6e2f496
Use coccinelle to fix most options_validate() call sites.
...
There was one that it could not find because it was in a macro definition.
I used the following semantic patch:
@@
expression e1, e2, e3, e4, e5;
@@
options_validate(e1,
e2,
- e3,
- e4,
e5)
2019-10-22 14:01:42 -04:00
Nick Mathewson
8a27023d21
Remove unused arguments from options_validate().
...
This change breaks compilation; a subsequent commit will fix it with
a coccinelle patch.
2019-10-22 13:56:11 -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
3c071f3002
Merge remote-tracking branch 'tor-github/pr/1330' into maint-0.4.1
2019-10-22 12:54:37 -04:00
Nick Mathewson
d08d29f15f
Merge remote-tracking branch 'tor-github/pr/1341' into maint-0.4.1
2019-10-22 12:53:06 -04:00
Nick Mathewson
7d75e1dbdf
Merge remote-tracking branch 'tor-github/pr/1446'
2019-10-22 12:52:32 -04:00
Nick Mathewson
b588b60876
Merge remote-tracking branch 'tor-github/pr/1343' into maint-0.4.1
2019-10-22 12:51:27 -04:00
Nick Mathewson
9769df89fe
Merge remote-tracking branch 'tor-github/pr/1303' into maint-0.4.1
2019-10-22 12:15:06 -04:00
Nick Mathewson
c1bf4260b6
Merge remote-tracking branch 'tor-github/pr/1302' into maint-0.4.1
2019-10-22 12:13:47 -04:00
Nick Mathewson
d4dde249a0
Merge remote-tracking branch 'tor-github/pr/1346' into maint-0.4.1
2019-10-22 12:11:50 -04:00
Nick Mathewson
4c8af10f0e
Merge remote-tracking branch 'tor-github/pr/1385' into maint-0.4.1
2019-10-22 12:08:46 -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
7e7a4874b8
test_addr.c: use COCCI to suppress macros coccinelle cannot parse.
2019-10-22 09:32:13 -04:00
Nick Mathewson
0da349aa5e
test.h: Use COCCI to suppress macros Coccinelle does not understand.
2019-10-22 09:32:13 -04:00
Nick Mathewson
0b862a7616
threads.h: coccinelle cannot understand a macro.
2019-10-22 09:32:13 -04:00
Nick Mathewson
4346e5569e
ctassert.h: fix CTASSERT_DECL so coccinelle can parse it.
2019-10-22 09:32:13 -04:00
Nick Mathewson
189375fb5d
ratelim.h: use COCCI to hide an initializer.
2019-10-22 09:32:13 -04:00
Nick Mathewson
c77f57d37b
util_bug.h: Coccinelle does not understand IF_BUG_ONCE or #nodef.
2019-10-22 09:32:13 -04:00
Nick Mathewson
fb4b6b6436
weakrng.h: use COCCI to hide a macro coccinelle cannot parse.
2019-10-22 09:32:13 -04:00
Nick Mathewson
d1cdb1a24e
Use STMT_BEGIN/END in parse_int.c so coccinelle can handle it.
2019-10-22 09:32:13 -04:00
Nick Mathewson
41f44d8760
smartlist.h: use COCCI to hide SMARTLIST_FOREACH_JOIN from Coccinelle
2019-10-22 09:32:13 -04:00
Nick Mathewson
514c61e406
namemap_st.h: Use COCCI to hide an initializer.
2019-10-22 09:32:13 -04:00
Nick Mathewson
2695f7e68c
timeval.h: Coccinelle cannot understand timercmp.
2019-10-22 09:32:13 -04:00
Nick Mathewson
9f50a92a7e
Fix a macro in address.c so coccinelle can understand it
2019-10-22 09:32:13 -04:00
Nick Mathewson
0abe89519b
timers.c: define TIMEOUT_PUBLIC to no tokens when using COCCI.
2019-10-22 09:32:13 -04:00
Nick Mathewson
9453746b5e
dispatch_naming.c: when COCCI is defined, disable unparseable macros.
2019-10-22 09:32:13 -04:00
Nick Mathewson
04a74d4aa7
conftesting.h: when COCCI is defined, disable unhandled macros
2019-10-22 09:32:13 -04:00
Nick Mathewson
3e41459dff
confmacros.h: fix coccinelle parsing.
2019-10-22 09:32:13 -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