fix: use correct guest IP for slirp4netns port forwarding#216
Closed
claude-claude[bot] wants to merge 1 commit intowork-from-mainfrom
Closed
fix: use correct guest IP for slirp4netns port forwarding#216claude-claude[bot] wants to merge 1 commit intowork-from-mainfrom
claude-claude[bot] wants to merge 1 commit intowork-from-mainfrom
Conversation
Change slirp4netns port forwarding from 10.0.2.100 to 10.0.2.15, which is the standard guest IP in slirp4netns's internal network (10.0.2.0/24). The previous configuration caused slirp_add_hostfwd to fail with: "bad request: add_hostfwd: slirp_add_hostfwd failed" This was because 10.0.2.100 is not a valid guest address in slirp4netns's view. The standard guest IP is 10.0.2.15 (with gateway at 10.0.2.2). Changes: - Update slirp0 TAP device IP from 10.0.2.100 to 10.0.2.15 - Update add_hostfwd guest_addr to use 10.0.2.15 - Update DNAT rule to redirect from 10.0.2.15 to actual guest IP The port forwarding flow remains: host -> slirp4netns -> 10.0.2.15 -> DNAT -> guest Fixes test_port_forward_rootless test failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
4 tasks
Owner
|
Cherry-picked into PR #217 (http-proxy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI Fix
Fixes CI #21635772224
Problem
The
test_port_forward_rootlesstest was failing with timeout errors. The root cause was that slirp4netns port forwarding was failing with:Investigation showed that the code was attempting to forward to
10.0.2.100, which slirp4netns rejected as an invalid guest address. This is because10.0.2.100is outside the standard slirp4netns guest IP range.Solution
Changed the slirp4netns port forwarding configuration to use
10.0.2.15, which is the standard guest IP in slirp4netns's internal network (10.0.2.0/24with gateway at10.0.2.2).Changes made:
10.0.2.100to10.0.2.15add_hostfwdAPI call to useguest_addr: "10.0.2.15"10.0.2.15to the actual guest IPThe port forwarding flow remains the same:
This fix should resolve all 5 failing jobs that were experiencing port forwarding issues in rootless networking mode.
Generated by Claude | Fix Run