In #40208 (closed) the behaviour for when a relay doesn't publish due to an RFC1918 IP address is addressed, but in the initial report there is this line:
*\[info\] address_can_be_used(): Address '127.0.0.1' is a private IP address. Tor relays that use the default DirAuthorities must have public IP addresses.*
which is only logged at info but is the only thing that provides a hint why the relay stopped publishing. It should probably be louder and explain both ways to fix the issue.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
Related merge requests 1
When this merge request is accepted, this issue will be closed automatically.
It looks like this message comes from the address_can_be_used() function, which takes a severity level as an argument. That severity level seems to come from calls to find_my_address(). I wonder why we're passing it INFO in this case.
It looks like the only call site I hit for find_my_address is relay_find_addr_to_publish() in relay_find_addr.c.
relay_find_addr_to_publish() gets hit a lot, so we probably wouldn't want to make it spam the logs, but surely there is some other place that we can try to warn. Perhaps something called from options_act() would be better?
Interestingly, I don't think that this problem is new with 0.4.5.
Yeah I think we could use it in option validate as a way to validate the config.
However, a failure of that function doesn't mean tor won't work since we do address discovery through authorities as well. Furthermore, that function changes tor's state and thus I would avoid using it for config validation tbh :S
We could make it take a "validate only" but it might complexify an already very complex function or we could think of decoupling it into a validation part and "act on the option" part but again, possibly some more complex work.
Unclear to me here what is best approach. Address discovery is quite a complex algorithm already done constantly at different stage in the tor process so maybe a validation function would be the way to go...