Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 325
    • Issues 325
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #20151
Closed
Open
Issue created Sep 16, 2016 by teor@teor

Fix parse_virtual_addr_network minimum network size

parse_virtual_addr_network does:

  const int max_bits = ipv6 ? 40 : 16;

then:

  if (bits > max_bits) {
    if (msg)
      tor_asprintf(msg, "VirtualAddressNetwork%s expects a /%d "
                   "network or larger",ipv6?"IPv6":"", max_bits);
    return -1;
  }

Firstly, the log message refers to a minimum ("n or larger" makes n a minimum, not a maximum), but the variable is named "max_bits". So we should rename it to min_bits.

Secondly, an IPv6 /40 is terribly restrictive.

For people to use their local IPv6 allocations, we should allow at least a /64.

If the goal is to have a /16 available, we could allow up to 128 - 16 = /112. But IPv6 has more addresses than IPv4, so I suggest that a /104 is a sensible minimum. (If someone wants to map more than 2^24 addresses at once, they can choose a larger network. We could make the minimum /96, but some providers split up /64s into /96s and give them out to end users.)

These limitations should also be documented in the tor man page.

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