Skip to content

port/gvisortapvsock: propagate TCP source IP - #654

Draft
AkihiroSuda wants to merge 3 commits into
rootless-containers:masterfrom
AkihiroSuda:fix-573
Draft

AkihiroSuda wants to merge 3 commits into
rootless-containers:masterfrom
AkihiroSuda:fix-573

Conversation

dependabot Bot and others added 3 commits October 13, 2026 00:51
Bumps [github.com/containers/gvisor-tap-vsock](https://github.com/containers/gvisor-tap-vsock) from 0.8.9 to 0.9.0.
- [Release notes](https://github.com/containers/gvisor-tap-vsock/releases)
- [Commits](containers/gvisor-tap-vsock@v0.8.9...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/containers/gvisor-tap-vsock
  dependency-version: 0.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
In gvisor-tap-vsock v0.9.0, VirtualNetwork.Mux() returns http.Handler
instead of *http.ServeMux, so *virtualnetwork.VirtualNetwork no longer
satisfied port.VirtualNetworkProvider and the network object was
silently dropped, failing with "virtual network services mux not
available in child context".

- Change VirtualNetworkProvider.Mux() to return http.Handler
- Add a compile-time assertion so this cannot regress silently
- Call the new VirtualNetwork.Close() on cleanup

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
The buffered TCP proxy introduced in ef4d092 dials the child via
VirtualNetwork.DialContextTCP, which always connects from the gateway
address, so the TCP source IP was not propagated even after
gvisor-tap-vsock v0.9.0 (containers/gvisor-tap-vsock#634).
UDP is already propagated, as it still uses the upstream PortsForwarder.

Use VirtualNetwork.DialContextTCPFrom with the client address of the
accepted connection, preserving the throughput of the buffered proxy.

go.mod temporarily replaces gvisor-tap-vsock with
containers/gvisor-tap-vsock#747 until it is merged and released.

Fix rootless-containers#573

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
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.

gvisor-tap-vsock port driver does not propagate the src IP

1 participant