Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • 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
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #17840
Closed (moved) (moved)
Open
Issue created Dec 13, 2015 by teor@teor

Add a minimal implementation of ClientUseIPv4 so IPv6-only clients can bootstrap

When Tor bootstraps, it connects to directory servers on their IPv4 address, regardless of the ClientUseIPv6 option.

We can add a ClientUseIPv4 option, and set it to 1 by default. (This needs a config check: reject the config if ClientUseIPv4 and ClientUseIPv6 are both 0.)

Then we can add connection_get_address_family_for_purpose(), which returns the address family that should be used by outgoing connections. In this minimal implementation, we'll return AF_INET, unless ClientUseIPv4 is 0 and ClientUseIPv6 is 1 (an IPv6-only client).

For the moment, we'll ignore ClientPreferIPv6ORPort in connection_address_family_for_purpose. Once IPv6-only clients can bootstrap, we'll find out if the existing implementation of ClientPreferIPv6ORPort works.

This will implement parts of #9068 (moved), but only the minimal functionality needed to decide whether we are allowed to connect via IPv4 or IPv6. (There are many clever things we could do on dual-stack clients in connection_address_family_for_purpose(), to guess which IP version to use, or to alternate IP versions to find the best one. Some of these designs are described in #9068 (moved) and #17834 (moved). But first we need to get IPv6-using and IPv6-only clients bootstrapping.)

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