]> git.ipfire.org Git - thirdparty/iptables.git/commit
nft: split parsing from netlink commands
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Jan 2020 12:20:13 +0000 (13:20 +0100)
committerPhil Sutter <phil@nwl.cc>
Mon, 11 May 2020 12:28:28 +0000 (14:28 +0200)
commita7f1e208cdf9c6392c99d3c52764701d004bdde7
treea479e3469ac3b1ec03b867acfdcd3912891162fd
parent70a3c1a07585de64b5780a415dc157079c34911b
nft: split parsing from netlink commands

This patch updates the parser to generate a list of command objects.
This list of commands is then transformed to a list of netlink jobs.
This new command object stores the rule using the nftnl representation
via nft_rule_new().

To reduce the number of updates in this patch, the nft_*_rule_find()
functions have been updated to restore the native representation to
skip the update of the rule comparison code.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
15 files changed:
iptables/Makefile.am
iptables/nft-arp.c
iptables/nft-bridge.c
iptables/nft-cmd.c [new file with mode: 0644]
iptables/nft-cmd.h [new file with mode: 0644]
iptables/nft-shared.c
iptables/nft-shared.h
iptables/nft.c
iptables/nft.h
iptables/tests/shell/testcases/ip6tables/0004-return-codes_0
iptables/tests/shell/testcases/iptables/0004-return-codes_0
iptables/xtables-arp.c
iptables/xtables-eb.c
iptables/xtables-restore.c
iptables/xtables.c