]> git.ipfire.org Git - thirdparty/iptables.git/commit
nft-ruleparse: Introduce nft_create_target()
authorPhil Sutter <phil@nwl.cc>
Tue, 31 Jan 2023 18:55:57 +0000 (19:55 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 10 Aug 2023 11:44:12 +0000 (13:44 +0200)
commit2a6eee89083c837ac429b0e5aba33bdcaeb51a57
tree58d444fd7ec52e20f8da9f1506e573c323f78785
parentbb7d5fde80ccb4672dcf9644b4ccf1bffc0919fd
nft-ruleparse: Introduce nft_create_target()

Like nft_create_match(), this is a small wrapper around the typical
target extension lookup and (standard) init code.

To use it from nft_parse_target() and nft_parse_log(), introduce an
inner variant which accepts the target payload size as parameter.

The call to rule_parse_ops::target callback was problematic with
standard target, because the callbacks initialized
iptables_command_state::jumpto with the target name, "standard" in that
case. Perform its tasks in nft_create_target(), keep it only for bridge
family's special handling of watcher "targets".

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-ruleparse-arp.c
iptables/nft-ruleparse-bridge.c
iptables/nft-ruleparse-ipv4.c
iptables/nft-ruleparse-ipv6.c
iptables/nft-ruleparse.c
iptables/nft-ruleparse.h