Skip to content

Preserve moved TUN devices across restore - #15942

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl1001712722
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl1001712722

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Preserve moved TUN devices across restore

The TUN save/restore support in 8bf3dc4 classified preserved NICs by
kind, but moving a NIC to another network namespace discarded that kind.
A moved TUN device was consequently removed during checkpoint. Its
restored close callback also retained the original stack and NIC ID,
rather than the destination chosen by the move.

Keep the kind when moving a NIC. Restore its close callback in the stack
that owns the preserved NIC, and remove the stale ownership fields from
the TUN endpoint. Extend the syscall coverage to move a TUN device
before checkpoint and verify its removal when the restored device is
closed.

Assisted-by: OpenAI Codex

FUTURE_COPYBARA_INTEGRATE_REVIEW=#15315 from tamird:tun-restore-after-netns-move ae6e695

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 18, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl1001712722 branch 2 times, most recently from d427da3 to 66c8329 Compare October 22, 2026 02:00
The TUN save/restore support in 8bf3dc4 classified preserved NICs by
kind, but moving a NIC to another network namespace discarded that kind.
A moved TUN device was consequently removed during checkpoint. Its
restored close callback also retained the original stack and NIC ID,
rather than the destination chosen by the move.

Keep the kind when moving a NIC. Restore its close callback in the stack
that owns the preserved NIC, and remove the stale ownership fields from
the TUN endpoint. Extend the syscall coverage to move a TUN device
before checkpoint and verify its removal when the restored device is
closed.

Assisted-by: OpenAI Codex

<!-- codex-thread: 01a0680f-bbf5-7511-95f7-4414f4e10d2e -->

FUTURE_COPYBARA_INTEGRATE_REVIEW=#15315 from tamird:tun-restore-after-netns-move ae6e695
PiperOrigin-RevId: 1001712722
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant