tor/src
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
..
app Merge branch 'tor-gitlab/mr/304' into maint-0.4.5 2021-02-12 13:13:50 -05:00
config Fix typos. 2020-11-12 11:44:09 -05:00
core metrics: Handle the connection finished flushing event 2021-02-17 09:54:05 -05:00
ext Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:36:42 -05:00
feature relay: Avoid a directory early fetch 2021-02-23 09:49:45 -05:00
lib Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-28 12:46:31 -05:00
rust Remove DirCache=1 from list of supported versions. 2021-02-08 11:40:35 -05:00
test relay: Avoid a directory early fetch 2021-02-23 09:49:45 -05:00
tools Add support for patterns on %include #25140 2020-07-15 22:01:08 +01:00
trunnel Update Trunnel for new machine_ctr field. 2020-06-08 18:05:34 -05:00
win32 Bump to 0.4.5.6-dev 2021-02-15 13:00:14 -05:00
arch_goals.md Document high-level architecture goals 2019-12-10 16:47:38 -06:00
include.am metrics: New feature module to track tor metrics 2020-10-27 10:43:42 -04:00
mainpage.md Move description of ext contents into an md file. 2020-07-02 13:46:25 -04:00