aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-07-10 13:06:20 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-07-10 13:06:20 -0400
commit46b86b22e3e554da6dcef77c00b622507f6c4b42 (patch)
tree70929ddf66cc4fc2f7dae3d2f5e0a51ec88493bf /src
parent1a4e475d5d86b0325914000889d5fd0dde42c2ad (diff)
downloadtor-46b86b22e3e554da6dcef77c00b622507f6c4b42.tar.gz
tor-46b86b22e3e554da6dcef77c00b622507f6c4b42.zip
addr: Remove a BUG() that can normally occur
Fix on unreleased code. The relay_new_address_suggestion() is called when a NETINFO cell is received thus not only for relay or bridges. Remove the BUG() that made sure only in server mode we could handle the suggested address. Fixes #40032 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r--src/feature/relay/relay_find_addr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/relay/relay_find_addr.c b/src/feature/relay/relay_find_addr.c
index 28b5985bb8..16d0a4733b 100644
--- a/src/feature/relay/relay_find_addr.c
+++ b/src/feature/relay/relay_find_addr.c
@@ -64,8 +64,9 @@ relay_address_new_suggestion(const tor_addr_t *suggested_addr,
tor_assert(peer_addr);
tor_assert(identity_digest);
- /* This should never be called on a non Tor relay. */
- if (BUG(!server_mode(options))) {
+ /* Non server should just ignore this suggestion. Clients don't need to
+ * learn their address let alone cache it. */
+ if (!server_mode(options)) {
return;
}