Skip to content

fix(netfilter): handle existing nftables tables gracefully during res… - #3136

Draft
alter-yash wants to merge 2 commits into
checkpoint-restore:criu-devfrom
alter-yash:fix-nftables-restore
Draft

fix(netfilter): handle existing nftables tables gracefully during res…#3136
alter-yash wants to merge 2 commits into
checkpoint-restore:criu-devfrom
alter-yash:fix-nftables-restore

Conversation

@alter-yash

Copy link
Copy Markdown

What this PR does:
When restoring a container into an already existing, persistent network namespace, CRIU fails during the netfilter restoration phase with an nftables "File exists" error because it blindly attempts to recreate tables that are already present in the namespace.

How it does it:
This patch modifies the netfilter restore logic to make nftables table creation idempotent. If a table already exists during the restoration phase, the error is handled gracefully and the process continues, rather than throwing a fatal error and aborting the restore.

Testing:
Validated on OpenSUSE Tumbleweed using a runc reproducer. Checkpointed a running container and successfully restored it into an existing, persistent network namespace (ip netns add repro-netns) without triggering the File exists table conflict in restore.log.

Fixes: #3135

Signed-off-by: Yash Ashok Maurya iyashmauryagdsc@example.com

…tore

Signed-off-by: Yash Maurya <iyashmauryagdsc@gmail.com>
@alter-yash
alter-yash marked this pull request as ready for review September 4, 2026 06:04
@alter-yash
alter-yash marked this pull request as draft September 4, 2026 10:07
Signed-off-by: Yash Maurya <iyashmauryagdsc@gmail.com>
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.

nftables: "File exists" error on restore when using persistent network namespaces

1 participant