-
Notifications
You must be signed in to change notification settings - Fork 0
fix: enable ip forwarding #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
📝 WalkthroughWalkthroughThis change adds a step to the entrypoint script that enables IP forwarding by writing a value to the kernel's IP forwarding configuration file. The new step is positioned after the /dev/net/tun device initialization and before NAT-related logic, ensuring packet forwarding is configured at the correct point in the startup sequence. No modifications to error handling or other control flow logic are included. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
bin/entrypoint (1)
19-21: Handle potential failure when enabling IPv4 forwardingThe placement and behavior look correct, but if writing to
/proc/sys/net/ipv4/ip_forwardfails (missing capabilities, read-only sysctl), the script silently continues and forwarding/NAT will be broken in a non-obvious way.Consider at least logging a warning (or exiting) on failure:
-# Enable IP forwarding -echo 1 > /proc/sys/net/ipv4/ip_forward +# Enable IP forwarding +echo 1 > /proc/sys/net/ipv4/ip_forward || \ + echo "WARN: Failed to enable IPv4 forwarding (net.ipv4.ip_forward)" >&2This keeps behavior the same on success while making misconfiguration easier to diagnose.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bin/entrypoint(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: cubic · AI code reviewer
Summary by cubic
Enable IPv4 IP forwarding at startup in bin/entrypoint so NAT/MASQUERADE and forwarded traffic work as expected. Fixes routing failures when NAT rules are present but forwarding is disabled.
Written for commit c91061d. Summary will update automatically on new commits.
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.