diff options
author | David Goulet <dgoulet@torproject.org> | 2023-07-12 08:17:23 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-07-12 08:17:23 -0400 |
commit | e4a8a128b1c5ef7b730f5adf65204993c35c54ac (patch) | |
tree | ea2c220d816ce25037ce8f266c86a8c86899526b /src | |
parent | 57976e918631089e3a175266f205bc804a4e6937 (diff) | |
parent | 3335829347e780a44751315402e878e6e5281242 (diff) | |
download | tor-e4a8a128b1c5ef7b730f5adf65204993c35c54ac.tar.gz tor-e4a8a128b1c5ef7b730f5adf65204993c35c54ac.zip |
Merge branch 'maint-0.4.7'
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/client/entrynodes.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c index 4783faf9dd..e5c89645f6 100644 --- a/src/feature/client/entrynodes.c +++ b/src/feature/client/entrynodes.c @@ -151,6 +151,7 @@ #include "feature/nodelist/node_st.h" #include "core/or/origin_circuit_st.h" #include "app/config/or_state_st.h" +#include "src/feature/nodelist/routerstatus_st.h" #include "core/or/conflux_util.h" @@ -4143,8 +4144,10 @@ maintain_layer2_guards(void) } /* Expire if relay has left consensus */ - if (router_get_consensus_status_by_id(g->identity) == NULL) { - log_info(LD_GENERAL, "Removing missing Layer2 guard %s", + const routerstatus_t *rs = router_get_consensus_status_by_id(g->identity); + if (rs == NULL || !rs->is_stable || !rs->is_fast) { + log_info(LD_GENERAL, "Removing %s Layer2 guard %s", + rs ? "unsuitable" : "missing", safe_str_client(hex_str(g->identity, DIGEST_LEN))); // Nickname may be gone from consensus and doesn't matter anyway control_event_guard("None", g->identity, "BAD_L2"); |