aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2013-02-11 17:09:10 -0500
committerRoger Dingledine <arma@torproject.org>2013-02-11 17:09:10 -0500
commitcc896f7c84c221d7dcfff1e0155533dce3ac5518 (patch)
tree55ff5874885e1208f15f728274fa80694897a45c /src/or/router.c
parent719940df2bdfbd0f5ee02a9ca404f345d2fc49e8 (diff)
downloadtor-cc896f7c84c221d7dcfff1e0155533dce3ac5518.tar
tor-cc896f7c84c221d7dcfff1e0155533dce3ac5518.tar.gz
Teach resolve_my_address() to return a cached answer
I didn't make any of the callers use this feature yet.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 4492ed271..bc1c6d215 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1712,7 +1712,7 @@ static int router_guess_address_from_dir_headers(uint32_t *guess);
int
router_pick_published_address(const or_options_t *options, uint32_t *addr)
{
- if (resolve_my_address(LOG_INFO, options, addr, NULL, NULL) < 0) {
+ if (resolve_my_address(LOG_INFO, options, addr, NULL, NULL, 0) < 0) {
log_info(LD_CONFIG, "Could not determine our address locally. "
"Checking if directory headers provide any hints.");
if (router_guess_address_from_dir_headers(addr) < 0) {
@@ -2103,7 +2103,7 @@ check_descriptor_ipaddress_changed(time_t now)
/* XXXX ipv6 */
prev = desc_routerinfo->addr;
- if (resolve_my_address(LOG_INFO, options, &cur, &method, &hostname) < 0) {
+ if (resolve_my_address(LOG_INFO, options, &cur, &method, &hostname, 0) < 0) {
log_info(LD_CONFIG,"options->Address didn't resolve into an IP.");
return;
}
@@ -2159,7 +2159,7 @@ router_new_address_suggestion(const char *suggestion,
}
/* XXXX ipv6 */
- if (resolve_my_address(LOG_INFO, options, &cur, NULL, NULL) >= 0) {
+ if (resolve_my_address(LOG_INFO, options, &cur, NULL, NULL, 0) >= 0) {
/* We're all set -- we already know our address. Great. */
tor_addr_from_ipv4h(&last_guessed_ip, cur); /* store it in case we
need it later */