diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-29 01:47:28 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-29 01:47:28 +0000 |
commit | 870fd18b8fe880c6194415f6744b08a3989a0166 (patch) | |
tree | e277a75238db8b402462b1bbd0bd578e6247c6f1 /src/or/routerparse.c | |
parent | 94507f1b6d563d301ef5ad284141105ebb3e9d2f (diff) | |
download | tor-870fd18b8fe880c6194415f6744b08a3989a0166.tar tor-870fd18b8fe880c6194415f6744b08a3989a0166.tar.gz |
Refactor some exit-policy-related functions that showed up in oprofile.
Specifically, split compare_tor_addr_to_addr_policy() from a loop with a bunch
of complicated ifs inside into some ifs, each with a simple loop. Rearrange
router_find_exact_exit_enclave() to run a little faster. Bizarrely,
router_policy_rejects_all() shows up on oprofile, so precalculate it per
routerinfo.
svn:r17802
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 3497ffbee..d401bf1f3 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1365,6 +1365,8 @@ router_parse_entry_from_string(const char *s, const char *end, goto err; }); policy_expand_private(&router->exit_policy); + if (policy_is_reject_star(router->exit_policy)) + router->policy_is_reject_star = 1; if ((tok = find_opt_by_keyword(tokens, K_FAMILY)) && tok->n_args) { int i; |