Fix large-batch netlink errors and revert failed try applies #30

Merged
benvin merged 1 commits from benvin/try-apply-error into main 2026-10-04 15:40:08 +11:00
Member

Large applies fail at the netlink socket: past ~300 rules the kernel commits the batch but drops ACKs beyond the receive buffer (ENOBUFS), and larger batches exceed the send buffer (EMSGSIZE). Separately, a failed try apply discarded its snapshot without reverting, leaving a possibly committed, unconfirmed ruleset with no pending revert.

  • raise netlink send/receive buffers to 64MiB (FORCE when permitted, sysctl-capped otherwise)
  • restore the snapshot when a try apply fails; on restore failure keep the snapshot and revert timer
Large applies fail at the netlink socket: past ~300 rules the kernel commits the batch but drops ACKs beyond the receive buffer (ENOBUFS), and larger batches exceed the send buffer (EMSGSIZE). Separately, a failed try apply discarded its snapshot without reverting, leaving a possibly committed, unconfirmed ruleset with no pending revert. - raise netlink send/receive buffers to 64MiB (FORCE when permitted, sysctl-capped otherwise) - restore the snapshot when a try apply fails; on restore failure keep the snapshot and revert timer
unkin-agent added 1 commit 2026-10-04 15:34:14 +11:00
Raise netlink buffers for large batches; restore snapshot when try apply fails
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
fe689e99ed
Author
Member

No findings.

No findings.
benvin merged commit 11fafc0e6a into main 2026-10-04 15:40:08 +11:00
benvin deleted branch benvin/try-apply-error 2026-10-04 15:40:08 +11:00
Sign in to join this conversation.