Skip to content

localhost relay skip ipv6 in Virtio mode - #40598

Closed
wangxin12 wants to merge 1 commit into
masterfrom
user/wangxin12/virtio-localhost
Closed

wangxin12 wants to merge 1 commit into
masterfrom
user/wangxin12/virtio-localhost

Conversation

@wangxin12

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

localhost relay skip ipv6 in Virtio mode, loopback0 isn't configured for IPv6, inbound IPv6 loopback isn't supported end-to-end yet.

PR Checklist

  • Closes: Link to issue Can not access container ports through VirtuioProxy #40507
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings May 19, 2026 20:42
@wangxin12
wangxin12 requested a review from a team as a code owner May 19, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates Virtio localhost relay handling to avoid attempting IPv6 loopback relay in Virtio mode, since IPv6 loopback isn’t supported end-to-end yet for the virtio loopback0 device.

Changes:

  • Adds an IPv4-only gate (AF_INET) for the LocalhostRelay path when the target is loopback/unspecified.
  • Adds an inline comment explaining why IPv6 is skipped.

}

if (WI_IsFlagSet(m_flags, VirtioNetworkingFlags::LocalhostRelay) && (unspecified || loopback))
// skip ipv6, virtio loopback0 device doesn't support ipv6 loopback

if (WI_IsFlagSet(m_flags, VirtioNetworkingFlags::LocalhostRelay) && (unspecified || loopback))
// skip ipv6, virtio loopback0 device doesn't support ipv6 loopback
if (WI_IsFlagSet(m_flags, VirtioNetworkingFlags::LocalhostRelay) && (unspecified || loopback) && addr.si_family == AF_INET)
@benhillis

Copy link
Copy Markdown
Member

Instead of working around it, could you try to fix the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants