summaryrefslogtreecommitdiffstats
path: root/iptables/nft-shared.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-07-19 18:32:01 +0200
committerFlorian Westphal <fw@strlen.de>2018-07-19 23:08:55 +0200
commitde782e891c0988cd38c78df32574d617ed65321f (patch)
tree7a5b687beefabd8a8373d8024c8db5f8479cc1f0 /iptables/nft-shared.c
parentae8eece4489b9267be2a82197908d80db73ffd0b (diff)
xtables: merge nft_ipv{4,6}_parse_target()
Both functions are identical, replace them by a common one in nft-shared.c. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r--iptables/nft-shared.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c
index 24287e97..7abe158b 100644
--- a/iptables/nft-shared.c
+++ b/iptables/nft-shared.c
@@ -924,6 +924,13 @@ bool compare_targets(struct xtables_target *tg1, struct xtables_target *tg2)
return true;
}
+void nft_ipv46_parse_target(struct xtables_target *t, void *data)
+{
+ struct iptables_command_state *cs = data;
+
+ cs->target = t;
+}
+
bool nft_ipv46_rule_find(struct nft_family_ops *ops,
struct nftnl_rule *r, struct iptables_command_state *cs)
{