Commit Graph

36899 Commits

Author SHA1 Message Date
David Goulet c1b43d79eb Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-10 10:04:26 -05:00
Nick Mathewson 690c7be253 Fix parsing bug in linux get_total_system_memory().
Use find_str_at_start_of_line(), not strstr() here: we don't want
to match "MemTotal: " if it appears in the middle of a line.

Fixes #40315; bugfix on 0.2.5.4-alpha.
2021-03-03 14:52:15 -05:00
David Goulet fa06aaf7d7 Merge branch 'maint-0.4.5' into release-0.4.5 2021-03-01 08:33:47 -05:00
David Goulet 49ce31b2b6 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-03-01 08:33:47 -05:00
David Goulet eb1759633a Merge branch 'maint-0.3.5' into maint-0.4.4 2021-03-01 08:33:41 -05:00
David Goulet 36212ad953 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-24 13:55:29 -05:00
David Goulet 6ea7eb58c6 Merge branch 'tor-gitlab/mr/321' into maint-0.4.5 2021-02-24 13:55:21 -05:00
David Goulet 83e448dd4d Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-23 12:28:04 -05:00
David Goulet 97e51dd01b Merge branch 'tor-gitlab/mr/326' into maint-0.4.5 2021-02-23 12:27:59 -05:00
David Goulet ad4f87ed3f Remove mallinfo() from codebase
Now deprecated in libc >= 2.33

Closes #40309

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 12:16:58 -05:00
David Goulet 296a557bfc Remove mallinfo() from codebase
Now deprecated in libc >= 2.33

Closes #40309

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 11:02:33 -05:00
David Goulet 39d0f69dfe relay: Avoid a directory early fetch
The directory_fetches_from_authorities() is used to know if a client or relay
should fetch data from an authority early in the boot process.

We had a condition in that function that made a relay trigger that fetch if it
didn't know its address (so we can learn it). However, when this is called,
the address discovery has not been done yet so it would always return true for
a relay.

Furthermore, it would always trigger a log notice that the IPv4 couldn't be
found which was inevitable because the address discovery process has not been
done yet (done when building our first descriptor).

It is also important to point out that starting in 0.4.5.1-alpha, asking an
authority for an address is done during address discovery time using a one-hop
circuit thus independent from the relay deciding to fetch or not documents
from an authority.

Small fix also is to reverse the "IPv(4|6)Only" flag in the notice so that if
we can't find IPv6 it would output to use IPv4Only.

Fixes #40300

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-23 09:49:45 -05:00
Nick Mathewson 4400ca83e0 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-22 15:37:39 -05:00
Nick Mathewson bc21ed3290 Merge remote-tracking branch 'tor-gitlab/mr/316' into maint-0.4.5 2021-02-22 15:37:31 -05:00
Nick Mathewson 37af94daf9 Merge remote-tracking branch 'tor-gitlab/mr/316' into release-0.4.5 2021-02-22 15:34:17 -05:00
Alexander Færøy 21ca3c2501 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-22 19:13:12 +00:00
Alexander Færøy 26c2e843f9 Merge remote-tracking branch 'tor-gitlab/mr/309' into maint-0.4.5 2021-02-22 19:12:53 +00:00
David Goulet 4d7f31b964 relay: Move log notice after suggested address lookup
When trying to find our address to publish, we would log notice if we couldn't
find it from the cache but then we would look at the suggested cache (which
contains the address from the authorities) in which we might actually have the
address.

Thus that log notice was misplaced. Move it down after the suggested address
cache lookup.

Closes #40300

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-22 09:13:54 -05:00
George Kadianakis 077e895934 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-19 13:26:52 +02:00
George Kadianakis 03c686563b Merge remote-tracking branch 'tor-gitlab/mr/308' into maint-0.4.5 2021-02-19 13:26:33 +02:00
Nick Mathewson 2b8af39d86 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-18 11:39:38 -05:00
Nick Mathewson aebd0a4080 Make our configure.ac script use the portable = comparison
Back in 0.4.5.1-alpha we added an `==` comparison, which isn't
portable.

Fixes bug #40298; bugfix on 0.4.5.1-alpha.
2021-02-17 12:36:23 -05:00
Roger Dingledine 8a8045c788 relay: No longer test dirport reachability for authorities
Now that exit relays don't allow exit connections to directory authority
DirPorts, the follow-up step is to make directory authorities stop doing
DirPort reachability checks.

Fixes #40287

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-17 10:28:18 -05:00
David Goulet 9f61d9238c metrics: Handle the connection finished flushing event
Turns out, we forgot to add the METRICS connection type fo the finished
flushing handler.

Fixes #40295

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-17 09:54:05 -05:00
Nick Mathewson 0330eeb3e3 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-15 13:00:38 -05:00
Nick Mathewson 336c45f1a5 Bump to 0.4.5.6-dev 2021-02-15 13:00:14 -05:00
Nick Mathewson ae1466e103 Reflow the blurb in the ReleaseNotes too. tor-0.4.5.6 2021-02-15 10:56:24 -05:00
Nick Mathewson 12aba3ee3e Release blurb and dedication for 0.4.5.6 2021-02-15 10:46:35 -05:00
Nick Mathewson 18754f9657 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-15 09:55:43 -05:00
Nick Mathewson 18db584caf Bump to 0.4.5.6. 2021-02-15 09:55:09 -05:00
Nick Mathewson 16954b3ec0 0456 ReleaseNotes: remove entries that appeared in 0.4.4.{6,7} 2021-02-15 09:52:00 -05:00
Nick Mathewson 799bab410b Sort the 0.4.5.6 release notes. 2021-02-12 14:13:06 -05:00
Nick Mathewson 4c743e4fbb 0.4.5.6 releasenotes: remove bugfixes on 0.4.5.x 2021-02-12 14:11:29 -05:00
Nick Mathewson f825184e72 Begin releasenotes for 0456 2021-02-12 14:08:46 -05:00
Nick Mathewson fa8d438571 Start an 0456 changelog. 2021-02-12 13:42:22 -05:00
David Goulet 90c4702ff0 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-12 13:13:57 -05:00
David Goulet 5887c1f1f3 Merge branch 'tor-gitlab/mr/304' into maint-0.4.5 2021-02-12 13:13:50 -05:00
David Goulet d47e937a50 test: Fix duplicate ORPort test
The comment of that specific unit test wanted 4 ORPorts but for some reasons
we tested for 3 which before the previous commit related to #40289, test would
pass but it was in fact wrong.

Now the code is correct and 4 was in fact correct expected number of ports.

Related to #40289

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-12 13:13:43 -05:00
David Goulet dfcb050bbf config: Do not compare for duplicate ORPorts with different addresses
We were just looking at the family which is not correct because it is possible
to have two explicit ORPort for the same family but different addresses. One
example is:

  ORPort 127.0.0.1:9001 NoAdvertise
  ORPort 1.2.3.4:9001 NoListen

Thus, this patch now ignores ports that have different addresses iff they are
both explicits. That is, if we have this example, also two different
addresses:

  ORPort 9001
  ORPort 127.0.0.1:9001 NoAdvertise

The first one is implicit and second one is explicit and thus we have to
consider them for removal which in this case would remove the "ORPort 9001" in
favor of the second port.

Fixes #40289

Signe-off-by: David Goulet <dgoulet@torproject.org>
2021-02-12 13:13:43 -05:00
David Goulet 4a7fcc7361 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-12 12:57:18 -05:00
David Goulet bdca475518 Merge branch 'tor-gitlab/mr/302' into maint-0.4.5 2021-02-12 12:56:15 -05:00
David Goulet 73bedcaf4d Merge branch 'tor-gitlab/mr/303' into maint-0.4.5 2021-02-12 12:54:52 -05:00
Alexander Færøy 8e493f321a Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-12 15:23:34 +00:00
Alexander Færøy d24a6b2f75 Merge remote-tracking branch 'tor-gitlab/mr/293' into maint-0.4.5 2021-02-12 15:23:02 +00:00
George Kadianakis 14bd196eb8 Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-12 13:54:18 +02:00
George Kadianakis 088a74aaab Merge remote-tracking branch 'tor-gitlab/mr/294' into maint-0.4.5 2021-02-12 13:53:45 +02:00
George Kadianakis fe32ac926e Merge branch 'maint-0.4.5' into release-0.4.5 2021-02-12 13:50:36 +02:00
George Kadianakis 726d62947c Merge remote-tracking branch 'tor-gitlab/mr/295' into release-0.4.5 2021-02-12 13:49:43 +02:00
George Kadianakis 58b5300f44 Merge remote-tracking branch 'tor-gitlab/mr/295' into maint-0.4.5 2021-02-12 13:44:03 +02:00
David Goulet 80b33ae1ca config: Set flag for implicit port address
Fun bug where we thought we were using the default "false" value when an
implicit address was detected but if we had an explicit address before, the
flag was set to true and then we would only use that value.

And thus, for some configurations, implicit addresses would be flagged as
explicit and then configuring ports goes bad.

Related to #40289

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-11 16:12:59 -05:00