mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
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@torproject.org>
This commit is contained in:
parent
433a1949e8
commit
230293c169
@ -133,7 +133,7 @@ getinfo_helper_misc(control_connection_t *conn, const char *question,
|
|||||||
*answer = tor_strdup("VERBOSE_NAMES EXTENDED_EVENTS");
|
*answer = tor_strdup("VERBOSE_NAMES EXTENDED_EVENTS");
|
||||||
} else if (!strcmp(question, "address")) {
|
} else if (!strcmp(question, "address")) {
|
||||||
tor_addr_t addr;
|
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";
|
*errmsg = "Address unknown";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user