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
teor
ec6fbf1ca6
nodelist: Use safe string functions in describe.c
...
Rewrite format_node_description() and router_get_verbose_nickname() to
use strlcpy() and strlcat(). The previous implementation used memcpy()
and pointer arithmetic, which was error-prone.
Closes ticket 31545. This is CID 1452819.
2019-08-29 13:09:08 +10:00