fix: clear lingering IPv6 blackhole after exit node deselect - #189
Conversation
setTunnelNetworkSettings keeps the previous IPv6 config when the property is left nil. Always assign empty IPv6 settings so the ::/0 blackhole from an exit node does not stick after deselection.
📝 WalkthroughWalkthrough
ChangesIPv6 tunnel settings
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Pull request overview
This PR addresses a tvOS-specific NetworkExtension behavior where leaving NEPacketTunnelNetworkSettings.ipv6Settings as nil can cause the system to retain previously-applied IPv6 configuration (including a lingering ::/0 blackhole) after an IPv6 exit node is deselected.
Changes:
- Updates tunnel settings construction to always set
ipv6Settingseven when there is no active IPv6 configuration, aiming to force the system to clear stale IPv6 state.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@CicerBro please update the title of the PR. The patch valid for tv and iOS too |
|
/testflight |
|
TestFlight builds uploaded |
What this fixes
After deselecting an IPv6 exit node, traffic could still hit a leftover
::/0blackhole.NEPacketTunnelNetworkSettingskeeps the previous IPv6 configuration when the IPv6 property is leftnilon the nextsetTunnelNetworkSettingscall, so the exit-node routes never fully cleared.Change
Always assign an explicit empty IPv6 settings object when there is no IPv6 config, forcing the system to drop the previous blackhole.
Closes
Summary by CodeRabbit