Re: Atomic ruleset update through libnftables

Florian Westphal <[email protected]> Tue, 24 Feb 2026 13:57:51 +0100
Newsgroups gmane.comp.security.firewalls.netfilter.general
Message-ID <[email protected]>
Subham Pal <[email protected]> wrote:
> I am writing a firewall program and intending to configure nftables
> using libnftables userspace library. The plan is to use
> nft_run_cmd_from_buffer function call, passing JSOn input to its
> buffer.
> 
> If I provide a set of rule updates to this function, will they be
> applied atomically? The manpage does not seem to elaborate on this.

Yes, its applied atomically.  You can validate by running 'nft monitor'
on another terminal, this will show you when a new generation/config
arrives, and what was added/removed as part of the update.