commit af0e8d834e4b1da029f7505745225f848e96def6 Author: Roger Dingledine arma@torproject.org Date: Sat May 21 19:23:27 2011 -0400
don't mark our descriptor dirty if our onion key hasn't changed --- changes/bug3263 | 4 ++++ src/or/router.c | 5 +++++ 2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/changes/bug3263 b/changes/bug3263 new file mode 100644 index 0000000..43202c2 --- /dev/null +++ b/changes/bug3263 @@ -0,0 +1,4 @@ + o Minor bugfixes: + - Don't publish a new relay descriptor when we reload our onion key, + unless the onion key has actually changed. Fixes bug 3263 and + resolves another cause of bug 1810. Bugfix on 0.1.1.11-alpha. diff --git a/src/or/router.c b/src/or/router.c index 184715b..f6728aa 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;
tor-commits@lists.torproject.org