mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Fix condition statement for accept items, fix two asserts
svn:r16524
This commit is contained in:
parent
34e083dde1
commit
4a74b9a7df
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user