From af0e8d834e4b1da029f7505745225f848e96def6 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 21 May 2011 19:23:27 -0400 Subject: don't mark our descriptor dirty if our onion key hasn't changed --- src/or/router.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/or/router.c') 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; -- cgit v1.2.3-54-g00ecf