Commit f0c29f08 authored by David Goulet's avatar David Goulet 🤘
Browse files

relay: Don't BUG() if we can't find authority descriptor

We can end up trying to find our address from an authority while we don't have
yet its descriptor.

In this case, don't BUG() and just come back later.

Closes #40231
Signed-off-by: David Goulet's avatarDavid Goulet <>
parent 743a5ef2
o Minor bugfixes (relay):
- If we were unable to build our descriptor, don't mark that we've
advertised our descriptor. Also remove an harmless BUG(). Fixes bug 40231;
bugfix on
......@@ -198,9 +198,13 @@ relay_addr_learn_from_dirauth(void)
const node_t *node = node_get_by_id(rs->identity_digest);
if (BUG(!node)) {
/* If there is a routerstatus_t, there is a node_t thus this should
* never fail. */
if (!node) {
/* This can happen if we are still in the early starting stage where no
* descriptors we actually fetched and thus we have the routerstatus_t
* for the authority but not its descriptor which is needed to build a
* circuit and thus learn our address. */
log_info(LD_GENERAL, "Can't build a circuit to an authority. Unable to "
"learn for now our address from them.");
extend_info_t *ei = extend_info_from_node(node, 1);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment