On Mon, Nov 21, 2022 at 12:19:31PM +0100, Florian Westphal wrote: > Before, nft fails to restore some rules because it sees: > insert rule ip filter INPUT iifname iifname ip ... > > Add extra escaping for " so that the shell won't remove it and > nft will see 'iifname "iifname"'. This is fixing up the wrong side, see: struct xt_xlate_{mt,tg}_params::escape_quotes this is set if iptables-translate was called and unset if iptables-restore-translate was called. I didn't invent this, but the logic seems to be escape quotes when printing a command, don't when printing a dump file content. I have a patch in my queue which extends the conditional quoting to interface names. Will submit it later today along with other fixes in that corner. Cheers, Phil