[tor-bugs] #16056 [Tor]: getinfo exit-policy/ipv6 does not show masks >= 32

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat May 16 18:34:16 UTC 2015


#16056: getinfo exit-policy/ipv6 does not show masks >= 32
---------------------+-------------------------------
 Reporter:  gturner  |          Owner:
     Type:  defect   |         Status:  new
 Priority:  normal   |      Milestone:
Component:  Tor      |        Version:  Tor: 0.2.5.12
 Keywords:           |  Actual Points:
Parent ID:           |         Points:
---------------------+-------------------------------
 After enabling IPv6 on an exit node, I was discouraged by the lack of IPv6
 policy displayed on Atlas, where there is a section in which IPv6 policy
 should be displayed, but the list is empty for my node, causing me to fear
 that my exit node could be used to relay spam on port 25 over IPv6, etc.

 So I connected to the ControlPort and issued "getinfo exit-policy/ipv6" to
 confirm that there are sane defaults being applied to IPv6 policy.  Indeed
 there are, and even private networks like "reject6 [fc00::]/7:*" are
 automatically configured, great!

 However policies that I manually added, for example:

   ExitPolicy reject6 [2610:148:1f10::]/48:*

 ...are not being output correctly by the getinfo command, for example:

   reject6 [2610:148:1f10::]:*

 ...no mask!

 Turns out that in function policy_write_item in src/or/policies.c the mask
 is being hidden if mask bits is >= 32, which makes sense for IPv4, but for
 IPv6 the test should be 128.

 Attached is a trivial patch which I've tested and confirmed it corrects
 the getinfo policy output.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16056>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list