Skip to contentSkip to conversation

nftables atomic updates

DISCUSSION Frank Myhr 2 participants 3 messages Jan 28, 2020 – Jan 29, 2020

lore
Share & tools
lore

Frank Myhr

author
#0 lore raw

Hi,

I'm belatedly moving from iptables and ipset to nftables. I've become accustomed to using 'ipset swap' to atomically update large ipsets (by loading the update into a temp ipset, then swapping the temp ipset with the old one, then finally deleting the temp ipset). From reading the fine nftables wiki I gather that all nft operations* included in a single file run with 'nft -f <file>' are first built up in parallel memory structures and then applied atomically. Is this statement correct?

* I'm particularly interested in 'add element' operations.

Thanks,
Frank

#1 lore raw

Hi Frank,

Quoted 10 lines · Frank Myhr

Hi,

I'm belatedly moving from iptables and ipset to nftables. I've become accustomed to using 'ipset swap' to atomically update large ipsets (by loading the update into a temp ipset, then swapping the temp ipset with the old one, then finally deleting the temp ipset). From reading the fine nftables wiki I gather that all nft operations* included in a single file run with 'nft -f <file>' are first built up in parallel memory structures and then applied atomically. Is this statement correct?

Quoted 4 lines

* I'm particularly interested in 'add element' operations.

Thanks,
Frank

Yes, any nft script or command is atomic.

Cheers ... Duncan.

author
#2 lore raw
Quoted 3 lines · Duncan Roe

Yes, any nft script or command is atomic.

Cheers ... Duncan.

Thanks, Duncan. Much appreciate the confirmation.

Best regards,
Frank