diff options
author | Roger Dingledine <arma@torproject.org> | 2011-05-21 19:23:27 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2011-05-21 19:23:27 -0400 |
commit | af0e8d834e4b1da029f7505745225f848e96def6 (patch) | |
tree | eca0e87e155dc6155324cef7a9a1181a3cc238f7 /src/or/router.c | |
parent | 1ba1bdee4bd8f3c00e603fe9b0fd2f14eeb60466 (diff) | |
download | tor-af0e8d834e4b1da029f7505745225f848e96def6.tar.gz tor-af0e8d834e4b1da029f7505745225f848e96def6.zip |
don't mark our descriptor dirty if our onion key hasn't changed
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c index 184715b750..f6728aac91 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -82,6 +82,11 @@ static authority_cert_t *legacy_key_certificate = NULL; static void set_onion_key(crypto_pk_env_t *k) { + if (onionkey && !crypto_pk_cmp_keys(onionkey, k)) { + /* k is already our onion key; free it and return */ + crypto_free_pk_env(k); + return; + } tor_mutex_acquire(key_lock); crypto_free_pk_env(onionkey); onionkey = k; |