Scale IPv6 address counts in policy_summary_reject to avoid overflow
commit408c53b7a78767e04124fec4c4d470fe474e4906
authorteor <teor2345@gmail.com>
Wed, 1 Feb 2017 04:31:33 +0000 (1 15:31 +1100)
committerNick Mathewson <nickm@torproject.org>
Wed, 1 Feb 2017 14:39:06 +0000 (1 09:39 -0500)
tree2ea25aa1880d8f844012aac45cda12894d608904
parent4667a40ca944134866b95b10407a7e471206aa00
Scale IPv6 address counts in policy_summary_reject to avoid overflow

This disregards anything smaller than an IPv6 /64, and rejects ports that
are rejected on an IPv6 /16 or larger.

Adjust existing unit tests, and add more to cover exceptional cases.

No IPv4 behaviour changes.

Fixes bug 21357
src/or/policies.c
src/test/test_policy.c