tor/changes/ticket40300
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

9 lines
503 B
Plaintext

o Minor bugfixes (relay):
- Remove a spammy log notice that should not have been indicating the
operator that its IPv4/v6 was missing but it was not. Fixes bug 40300;
bugfix on 0.4.5.1-alpha.
- Do not query the address cache early in the boot process when deciding
if we a relay needs to fetch early directory information from an
authority. This resulted in a relay falsely believing it didn't have an
address and thus triggering an authority fetch at each boot.