Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libxtrans
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • lib
  • libxtrans
  • Merge requests
  • !10

Automatically disable inet6 transport if ipv6 is disabled on machine

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ray Strode requested to merge halfline/libxtrans:ipv6-disable-fix into master May 10, 2022
  • Overview 2
  • Commits 1
  • Changes 1

If a machine is booted with ipv6.disable=1, trying to bind to an AF_INET6 socket will fail with AFNOSUPPORT.

The tcp transport automatically falls back to ipv4 in this case, but the more specific inet6 transport just fails.

This failure leads to MakeAllCOTSServerListeners returning a partial success.

Unfortunately, the X server can't really contiue with partial successes from this function if -displayfd is in use, since that would, in other cases, potentially lead to the -displayfd electing a display number that is potentially partially in use by a rogue program.

This commit addresses the issue by automatically disabling transports when they fail with AFNOSUPPORT, leading them to get ignored, rather than proceeding and ultimately returning from MakeAllCOTSServerListerns with partial=TRUE.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: ipv6-disable-fix