diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-19 16:28:13 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-19 16:28:13 +0000 |
commit | 140ef7d0f88c85726fae59389b103f8ce0e12b1f (patch) | |
tree | 4a7adcceff05dc9c08dfca69926c3d298faf65f3 /src | |
parent | 106e01db3de223ad2ff26254915792b40420362a (diff) | |
download | tor-140ef7d0f88c85726fae59389b103f8ce0e12b1f.tar.gz tor-140ef7d0f88c85726fae59389b103f8ce0e12b1f.zip |
r15957@catbus: nickm | 2007-10-19 12:22:18 -0400
Report our IP address in our vote if it turns out that our hostname isn't a fqdn.
svn:r12047
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 4ed163e431..e773714eac 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1875,6 +1875,10 @@ generate_networkstatus_vote_obj(crypto_pk_env_t *private_key, log_warn(LD_NET, "Couldn't resolve my hostname"); return NULL; } + if (!strchr(hostname, '.')) { + tor_free(hostname); + hostname = tor_dup_addr(addr); + } if (crypto_pk_get_digest(private_key, signing_key_digest)<0) { log_err(LD_BUG, "Error computing signing key digest"); return NULL; |