Ignore accept6/reject6 IPv4, warn about unexpected rule outcomes
commite033d5e90bcb63b68cfac07a4e041dd0ea839573
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Fri, 11 Sep 2015 05:10:54 +0000 (11 15:10 +1000)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Tue, 15 Sep 2015 14:13:03 +0000 (16 00:13 +1000)
treedb28a5545407742ce86f0ea8a11406d10671b017
parent60312dc08b30243740e85c2a944874014f682579
Ignore accept6/reject6 IPv4, warn about unexpected rule outcomes

When parsing torrc ExitPolicies, we now warn if:
  * an IPv4 address is used on an accept6 or reject6 line. The line is
    ignored, but the rest of the policy items in the list are used.
    (accept/reject continue to allow both IPv4 and IPv6 addresses in torrcs.)
  * a "private" address alias is used on an accept6 or reject6 line.
    The line filters both IPv4 and IPv6 private addresses, disregarding
    the 6 in accept6/reject6.

When parsing torrc ExitPolicies, we now issue an info-level message:
  * when expanding an accept/reject * line to include both IPv4 and IPv6
    wildcard addresses.

In each instance, usage advice is provided to avoid the message.

Partial fix for ticket 16069. Patch by "teor".
Patch on 2eb7eafc9d78 and a96c0affcb4c (25 Oct 2012),
released in 0.2.4.7-alpha.
changes/bug16069-exit-policy-rule6 [new file with mode: 0644]
src/common/address.c
src/or/policies.c
src/or/routerparse.c
src/or/routerparse.h
src/or/routerset.c
src/test/test_policy.c
src/test/test_routerset.c