[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] control: With GETINFO, don't trigger an address resolve



commit 230293c169f73923b290598a1df4872acf1dee68
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Fri Jul 17 10:56:22 2020 -0400

    control: With GETINFO, don't trigger an address resolve
    
    Tell the relay find address interface to only use the cache so we don't
    trigger an address resolve everytime the "GETINFO address" is called.
    
    Related #40025
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/feature/control/control_getinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/feature/control/control_getinfo.c b/src/feature/control/control_getinfo.c
index c489dfa865..4ac4f48a86 100644
--- a/src/feature/control/control_getinfo.c
+++ b/src/feature/control/control_getinfo.c
@@ -133,7 +133,7 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
     *answer = tor_strdup("VERBOSE_NAMES EXTENDED_EVENTS");
   } else if (!strcmp(question, "address")) {
     tor_addr_t addr;
-    if (!relay_find_addr_to_publish(get_options(), AF_INET, false, &addr)) {
+    if (!relay_find_addr_to_publish(get_options(), AF_INET, true, &addr)) {
       *errmsg = "Address unknown";
       return -1;
     }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits