Commit Graph

25926 Commits

Author SHA1 Message Date
rl1987
38cbfda119 Actually, bail out of routerstatus_format_entry() if fmt_addr32() fails 2020-05-21 13:43:41 +03:00
rl1987
8ab7e30484 Check that fmt_addr32() returned non-empty string before putting it into documents 2020-05-21 13:41:19 +03:00
rl1987
d8e24684b6 Check for possible failures of tor_inet_ntop/tor_inet_ntoa in fmt_addr32 and tor_dup_ip 2020-05-21 13:41:15 +03:00
rl1987
b5bfdbfd41 Check output value of tor_inet_ntop/tor_inet_ntoa in dns.c 2020-05-21 13:41:11 +03:00
David Goulet
ca13249dcc Merge branch 'tor-github/pr/1886' 2020-05-19 15:18:17 -04:00
David Goulet
ee0fb69fee Merge branch 'tor-github/pr/1897' 2020-05-19 15:17:08 -04:00
David Goulet
5d99985e43 Merge branch 'tor-github/pr/1894' 2020-05-19 15:14:38 -04:00
Nick Mathewson
400bc46d83 doxygen: add a link to src-ref on mainpage.md.
Closes 34246.
2020-05-19 09:44:36 -04:00
Nick Mathewson
9b55a62e73 Merge branch 'maint-0.4.3' 2020-05-19 09:39:12 -04:00
Nick Mathewson
68fe8826dd Doxygen: fix unbalanced groups.
Closes ticket 34255.
2020-05-19 09:18:39 -04:00
Neel Chauhan
087b466fcf Declare variables in for loops in rend_service_dump_stats() 2020-05-17 15:19:39 -07:00
Neel Chauhan
32e791be09 Fix spacing in if statement in tor_version_parse() 2020-05-16 22:26:30 -07:00
Neel Chauhan
2e0d0360cd Fix spacing in if statement in port_parse_config() 2020-05-16 22:23:59 -07:00
Nick Mathewson
c0dd2a6e39 bump to 0.4.3.5-dev 2020-05-15 09:02:12 -04:00
Nick Mathewson
75fc33f337 bump to 0.4.3.5 2020-05-14 10:37:42 -04:00
Nick Mathewson
1557e73c82 Merge branch 'bug34130_035' 2020-05-12 12:58:19 -04:00
Daniel Pinto
2913dbd6d9 Fix crash when tor is compiled with NSS and seccomp sandbox is enabled
Adds seccomp rules for socket and getpeername used by NSS
2020-05-12 12:56:06 -04:00
Daniel Pinto
cce16a939c Improve logging of included config files 2020-05-08 01:10:59 +01:00
Nick Mathewson
b7a165228f Merge remote-tracking branch 'tor-github/pr/1880/head' 2020-05-07 08:19:11 -04:00
Nick Mathewson
3a785dd5be Merge branch 'maint-0.4.3' 2020-05-06 17:17:19 -04:00
Nick Mathewson
b444096be5 Fix a boolean logic error when logging about invalid hostnames.
Fixes bug 34131; bugfix on 0.4.3.1-alpha.
2020-05-06 17:15:37 -04:00
Nick Mathewson
b7fcbb28d4 connection_or_finished_flushing(): add a missing "break;"
This one is harmless like the others (so far)
2020-05-06 17:09:27 -04:00
Nick Mathewson
e8fdba198e Merge branch 'maint-0.4.2' into maint-0.4.3 2020-05-06 17:07:47 -04:00
Nick Mathewson
b16c1e4cf6 Merge branch 'maint-0.4.1' into maint-0.4.2 2020-05-06 17:07:27 -04:00
Nick Mathewson
d41f1cd3ed btrack_orconn_cevent.c: Add a missing "break;" 2020-05-06 17:07:12 -04:00
Nick Mathewson
4a2347d290 Merge branch 'maint-0.4.3'
Amazingly, this time we had no merge conflicts with "falls through" comments.
2020-05-06 16:55:41 -04:00
Nick Mathewson
c116728209 Use __attribute__((fallthrough)) rather than magic GCC comments.
GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;

(In order to avoid conflicts, I'm applying this script separately to
each maint branch. This is the 0.4.3 version.)
2020-05-06 16:55:25 -04:00
Nick Mathewson
28ac17f433 Use __attribute__((fallthrough)) rather than magic GCC comments.
GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;

(In order to avoid conflicts, I'm applying this script separately to
each maint branch. This is the 0.4.2 version.)
2020-05-06 16:53:40 -04:00
Nick Mathewson
79ff2b6aab Use __attribute__((fallthrough)) rather than magic GCC comments.
GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;

(In order to avoid conflicts, I'm applying this script separately to
each maint branch. This is the 0.4.1 version.)
2020-05-06 16:52:03 -04:00
Nick Mathewson
cc397449fc Use __attribute__((fallthrough)) rather than magic GCC comments.
GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
2020-05-06 16:51:11 -04:00
Nick Mathewson
42246f8c9a Merge branch 'maint-0.4.3' 2020-05-06 16:50:21 -04:00
Nick Mathewson
2cd1c07658 hs_dos.c: rewrite a comment not to say "fallthrough"
There's nothing wrong with the comment, but the script I'm about to
apply wouldn't like it.
2020-05-06 16:49:57 -04:00
Nick Mathewson
d04b708b4b Merge branch 'maint-0.4.1' into maint-0.4.2 2020-05-06 16:47:03 -04:00
Nick Mathewson
82effefb69 Merge branch 'maint-0.4.3' 2020-05-06 16:47:03 -04:00
Nick Mathewson
fecc5fd38d Merge branch 'maint-0.4.2' into maint-0.4.3 2020-05-06 16:47:03 -04:00
Nick Mathewson
3e42464f5a Merge branch 'bug34078_prelim_035' into bug34078_prelim_041 2020-05-06 15:18:36 -04:00
Nick Mathewson
3d3641152b Remove an incorrect "Fall through" comment. 2020-05-06 15:08:02 -04:00
Nick Mathewson
8798c0a94a address.c: add a single (harmless) missing break; 2020-05-06 15:08:02 -04:00
Nick Mathewson
37b8324ed3 include compat_compiler for ed25519_donna 2020-05-06 15:08:02 -04:00
Nick Mathewson
9fe23b8672 Replace some "fall through" comments not at the end of a case. 2020-05-06 15:08:02 -04:00
Nick Mathewson
75547c01a3 Replace a "fall through" comment that was outside a switch. 2020-05-06 15:08:02 -04:00
Nick Mathewson
6c3c94357c Add a fallthrough macro.
This macro defers to __attribute__((fallthrough)) on GCC (and
clang).  Previously we had been using GCC's magic /* fallthrough */
comments, but clang very sensibly doesn't accept those.

Since not all compiler recognize it, we only define it when our
configure script detects that it works.

Part of a fix for 34078.
2020-05-06 15:08:02 -04:00
David Goulet
c81c5a2646 relay: Rename relay_resolve_addr.{c|h} file
New name is more accurate semantically.

Closes #33789

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-05 15:34:58 -04:00
Alex Xu (Hello71)
42dfcd0ae3 core/or: Lift slow call out of loop, #33977 2020-05-05 15:07:42 -04:00
David Goulet
a25f167072 config: New file resolve_addr.{c|h}
Move a series of function from config.c into that new file which is related to
address resolving.

Part of #33789

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-05 14:24:04 -04:00
David Goulet
445df9e7b5 relay: New file relay_resolve_addr.{c|h}
This commit moves router_pick_published_address() and the related helper
functions into the new file.

The log_addr_has_changed() function has been made public in router.h so we can
use it in relay_resolve_addr.c.

This is a refactoring as part of Sponsor 55. Only code movement at this
commit.

Part of #33789

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-05 14:24:04 -04:00
Nick Mathewson
f96b6ccee1 Merge branch 'maint-0.4.3' 2020-05-04 10:25:53 -04:00
Nick Mathewson
bbfc498e21 Merge branch 'maint-0.4.1' into maint-0.4.2 2020-05-04 10:25:52 -04:00
Nick Mathewson
b1c383e3e6 Fix a GCC 10.0.1 compilation error.
Do not try to stuff "HS_DESC_DECODE_GENERIC_ERROR" (-1) into a
socks5_reply_status_t (enum).  It doesn't actually make sense, and
isn't one of our documented extensions.

(This can only happen on a nonfatal assertion that we haven't seen,
so it probably isn't happening in practice.)

Fixes another case of bug 34077; bugfix on 0.4.3.1-alpha.
2020-04-30 23:04:56 -04:00
Nick Mathewson
6aaee6133d Merge branch 'bug34077_042' into bug34077_043 2020-04-30 23:01:58 -04:00