diff options
author | Peter Palfrader <peter@palfrader.org> | 2008-08-13 12:45:44 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2008-08-13 12:45:44 +0000 |
commit | 4a74b9a7df00b4883464a53da055ba61afa72446 (patch) | |
tree | a0afee087350d62f86e71c4f72d57000b75f35d7 /src/or/policies.c | |
parent | 34e083dde1aa66e2e19faabc6efa1c6f87d7a80f (diff) | |
download | tor-4a74b9a7df00b4883464a53da055ba61afa72446.tar.gz tor-4a74b9a7df00b4883464a53da055ba61afa72446.zip |
Fix condition statement for accept items, fix two asserts
svn:r16524
Diffstat (limited to 'src/or/policies.c')
-rw-r--r-- | src/or/policies.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index f0f96e659b..ac7ecbaf0b 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -967,8 +967,8 @@ policy_summary_item_split(policy_summary_item_t* old, uint16_t new_starts) { old->prt_max = new_starts-1; - tor_assert(old->prt_min < old->prt_max); - tor_assert(new->prt_min < new->prt_max); + tor_assert(old->prt_min <= old->prt_max); + tor_assert(new->prt_min <= new->prt_max); return new; } @@ -1054,7 +1054,7 @@ void policy_summary_add_item(smartlist_t *summary, addr_policy_t *p) { if (p->policy_type == ADDR_POLICY_ACCEPT) { - if (p->maskbits != 0) { + if (p->maskbits == 0) { policy_summary_accept(summary, p->prt_min, p->prt_max); } } else if (p->policy_type == ADDR_POLICY_REJECT) { |