[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] addr: Remove a BUG() that can normally occur
commit 46b86b22e3e554da6dcef77c00b622507f6c4b42
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Fri Jul 10 13:06:20 2020 -0400
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@xxxxxxxxxxxxxx>
---
src/feature/relay/relay_find_addr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/feature/relay/relay_find_addr.c b/src/feature/relay/relay_find_addr.c
index 28b5985bb..16d0a4733 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;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits