aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-09-05 17:02:53 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-09-05 17:02:53 +0300
commitcdd7e889703fbc089780f446715b7b41ccbf688e (patch)
treebb18312a2db760c7229ddcbd07fabdf82c3cb4bc /src/feature/nodelist
parent2591440faa2671b52c290879bb3d426eeeec6380 (diff)
parent0127888b0623696d654125b4fa69200485e65a7f (diff)
downloadtor-cdd7e889703fbc089780f446715b7b41ccbf688e.tar.gz
tor-cdd7e889703fbc089780f446715b7b41ccbf688e.zip
Merge branch 'tor-github/pr/1261'
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/microdesc_st.h2
-rw-r--r--src/feature/nodelist/nodelist.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/nodelist/microdesc_st.h b/src/feature/nodelist/microdesc_st.h
index c8265cb778..e017c46c79 100644
--- a/src/feature/nodelist/microdesc_st.h
+++ b/src/feature/nodelist/microdesc_st.h
@@ -33,6 +33,8 @@ struct microdesc_t {
unsigned int no_save : 1;
/** If true, this microdesc has an entry in the microdesc_map */
unsigned int held_in_map : 1;
+ /** True iff the exit policy for this router rejects everything. */
+ unsigned int policy_is_reject_star : 1;
/** Reference count: how many node_ts have a reference to this microdesc? */
unsigned int held_by_nodes;
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index 21914c6c6d..6ae8d2bcb1 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -1424,8 +1424,7 @@ node_exit_policy_rejects_all(const node_t *node)
if (node->ri)
return node->ri->policy_is_reject_star;
else if (node->md)
- return node->md->exit_policy == NULL ||
- short_policy_is_reject_star(node->md->exit_policy);
+ return node->md->policy_is_reject_star;
else
return 1;
}