diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2018-08-08 18:47:43 +0300 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2018-08-08 18:47:43 +0300 |
commit | 9c242e950b45ac67b2b741bc4e0c920a9a57cb43 (patch) | |
tree | 731d91a15aafa7eeab649360ade838884eddbadf /src/feature/relay | |
parent | 7787150521fda0370331dab80d043294e05e1598 (diff) | |
download | tor-9c242e950b45ac67b2b741bc4e0c920a9a57cb43.tar.gz tor-9c242e950b45ac67b2b741bc4e0c920a9a57cb43.zip |
Consider all routerinfo errors other than "not a server" transient
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/router.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 0cc4887232..40839f2605 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -164,22 +164,12 @@ routerinfo_err_to_string(int err) int routerinfo_err_is_transient(int err) { - switch (err) { - case TOR_ROUTERINFO_ERROR_NO_EXT_ADDR: - return 1; - case TOR_ROUTERINFO_ERROR_CANNOT_PARSE: - return 1; - case TOR_ROUTERINFO_ERROR_NOT_A_SERVER: - return 0; - case TOR_ROUTERINFO_ERROR_DIGEST_FAILED: - return 0; // XXX: bug? - case TOR_ROUTERINFO_ERROR_CANNOT_GENERATE: - return 1; - case TOR_ROUTERINFO_ERROR_DESC_REBUILDING: - return 1; - } - - return 0; + /** + * For simplicity, we consider all errors other than + * "not a server" transient - see discussion on + * https://trac.torproject.org/projects/tor/ticket/27034 + */ + return err != TOR_ROUTERINFO_ERROR_NOT_A_SERVER; } /** Replace the current onion key with <b>k</b>. Does not affect |