relay: Look at our cache when looking for an IP change
commita5538a36037641e49ca05aa3e90fec256794412b
authorDavid Goulet <dgoulet@torproject.org>
Fri, 18 Sep 2020 16:22:23 +0000 (18 12:22 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 17 Nov 2020 12:58:26 +0000 (17 07:58 -0500)
tree16a83b7cf7e9d374d218ca5817fad63c7165a9a3
parent4b981407335865795bb99c7297ec49d80455d693
relay: Look at our cache when looking for an IP change

Regularly, tor looks if its IP has changed. It does the entire auto discovery
process again. However, it is possible that it does not find anything.

Instead of thinking the IP changed to an unknown address, look at our cache
and see if that value has changed.

The reason for this is because if tor gets its address as a suggestion from a
directory authority, it is because the auto discovery failed and thus that
address should be consider for the IP change check.

Related to #40071

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/feature/relay/router.c