Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #16056

Closed (moved)
(moved)
Open
Created May 16, 2015 by Trac@tracbot

getinfo exit-policy/ipv6 does not show masks >= 32

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.

Trac:
Username: gturner

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking