aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-10-28 12:07:51 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-10-28 12:07:51 -0400
commit19b080f2aaffe8e6d9e83a7ca7593a3e01eecef9 (patch)
tree5f73c81187cf2488d92499b95f8572db4ff73d27
parent4481c1e6099864c0942c3bed1cfc59e90ebf503b (diff)
parent338185d8406a927c95c5c3c81e7925dbf8149044 (diff)
downloadtor-19b080f2aaffe8e6d9e83a7ca7593a3e01eecef9.tar.gz
tor-19b080f2aaffe8e6d9e83a7ca7593a3e01eecef9.zip
Merge branch 'tor-gitlab/mr/646'
-rw-r--r--changes/bug405234
-rw-r--r--src/feature/relay/relay_find_addr.c16
2 files changed, 13 insertions, 7 deletions
diff --git a/changes/bug40523 b/changes/bug40523
new file mode 100644
index 0000000000..880fc469fd
--- /dev/null
+++ b/changes/bug40523
@@ -0,0 +1,4 @@
+ o Minor bugfixes (relay):
+ - Remove a harmless "Bug" log message that can happen in
+ relay_addr_learn_from_dirauth() on relays during startup. Finishes
+ fixing bug 40231. Fixes bug 40523; bugfix on 0.4.5.4-rc.
diff --git a/src/feature/relay/relay_find_addr.c b/src/feature/relay/relay_find_addr.c
index f4f9d40823..5a32283a7b 100644
--- a/src/feature/relay/relay_find_addr.c
+++ b/src/feature/relay/relay_find_addr.c
@@ -212,17 +212,19 @@ relay_addr_learn_from_dirauth(void)
return;
}
const node_t *node = node_get_by_id(rs->identity_digest);
- if (!node) {
+ extend_info_t *ei = NULL;
+ if (node) {
+ ei = extend_info_from_node(node, 1, false);
+ }
+ if (!node || !ei) {
/* 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.");
- return;
- }
- extend_info_t *ei = extend_info_from_node(node, 1, false);
- if (BUG(!ei)) {
+ log_info(LD_GENERAL,
+ "Trying to learn our IP address by connecting to an "
+ "authority, but can't build a circuit to one yet. Will try "
+ "again soon.");
return;
}