Commit Graph

25950 Commits

Author SHA1 Message Date
George Kadianakis
d2c3b6ea1e Pick guards on the order they were sampled (prop310).
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-11 16:13:09 +03:00
Florentin Rochet
7bf0587ef1 Refactor some guard state file parsing code into functions.
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-11 16:12:31 +03:00
Nick Mathewson
1fb9be5396 Merge remote-tracking branch 'tor-github/pr/1902/head' 2020-06-05 10:08:27 -04:00
rl1987
3e4814edeb Fix some checks of tor_inet_ntoa() return value
Also, fix a format string.
2020-06-05 11:49:24 +03:00
Nick Mathewson
2b98df3c74 Merge remote-tracking branch 'tor-github/pr/1910/head' 2020-06-04 10:33:36 -04:00
c
8b568b50a5
config: Styling fix + use fmt_addr()
Conform to C99 as suggested by nickm on #32888 and use fmt_addr() rather
than tor_addr_to_str_dup()
2020-06-04 13:15:27 +00:00
c
1934e399af
config: Add interface address debug logging
Add logging for "the local network interface addresses" as requested by
ticket #32888.
2020-06-03 14:42:53 +00:00
Nick Mathewson
b4ccafd175 remove a period from a doxygen heading
The other headings don't have periods.
2020-06-02 11:47:20 -04:00
George Kadianakis
22a26a273e Merge branch 'tor-github/pr/1909' 2020-06-02 14:01:49 +03:00
c
7640a95602
config: Add IPv4 Address config debug logging
Per ticket #32888 this should address logging "the Address torrc
option", "and whether it is an IP address, or a DNS name"; or the
detected "local hostname", "and whether it is an IP address, or a DNS
name". Some of these details already seem to be logged, so just add
what's missing.
2020-06-01 13:02:21 +00:00
Roger Dingledine
39f2411b3f Preemptive circs should work with UseEntryGuards 0
Resume being willing to use preemptively-built circuits when
UseEntryGuards is set to 0. We accidentally disabled this feature with
that config setting (in our fix for #24469), leading to slower load times.

Fixes bug 34303; bugfix on 0.3.3.2-alpha.
2020-05-30 02:20:48 -04:00
David Goulet
5922087ea8 Merge branch 'tor-github/pr/1901' 2020-05-28 09:52:29 -04:00
George Kadianakis
8d8a9d7f1d Merge branch 'tor-github/pr/1898' 2020-05-27 15:17:55 +03:00
Neel Chauhan
fd5ea48c27 Add HS v3 status to the SIGUSR1 dumpstats() 2020-05-27 15:16:39 +03:00
Nick Mathewson
43f4324e29 Merge remote-tracking branch 'tor-github/pr/1899/head' 2020-05-21 10:08:48 -04:00
George Kadianakis
3121e5c103 Merge branch 'tor-github/pr/1850' 2020-05-21 16:24:32 +03:00
George Kadianakis
fb281daf29 Merge branch 'tor-github/pr/1861' 2020-05-21 16:22:47 +03:00
rl1987
7a004fce8d Tweak format string 2020-05-21 14:26:08 +03:00
rl1987
a5d28bf88f Check for NULL from tor_dup_ip() 2020-05-21 14:17:15 +03:00
rl1987
ded99992b8 Bail out of format_networkstatus_vote if fmt_addr32() failed.
Something is fishy if we cannot put IP address string into dir-vote line.
2020-05-21 13:43:45 +03:00
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
George Kadianakis
baee2feddd Fix an enum comparison that was blowing up jenkins.
The warning was:
    11:23:10 ../tor/src/feature/hs/hs_service.c: In function 'log_cant_upload_desc':
    11:23:10 ../tor/src/feature/hs/hs_service.c:3118:3: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
See #34254 for more info.

I guess this means that gcc assigned an unsigned type to the
`log_desc_upload_reason_t` enum and it warned if we compared it against 0...

For now I think it's simpler to remove that check instead of turning the enum
to a signed type, or trying to hack it some other way.

From what it seems, enum is up to the compiler on whether it's signed/unsigned:
     https://stackoverflow.com/questions/159034/are-c-enums-signed-or-unsigned
2020-05-21 13:39:49 +03:00
Damon Harris
c4fb3bfed5 Add support for console control signals in Windows 2020-05-20 23:28:39 +05:30
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