From b756cf08d6eff885d808504c674bd7eb5ebabfbb Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 18 Sep 2013 16:54:15 +0200 Subject: nft: consolidate nft_rule_* functions to support ARP This should help to avoid code duplication to support ARP. As a result, we have a common generic infrastructure for IPv4, IPv6 and ARP. This patch removes nft_arp_rule_append and nft_arp_rule_insert, which were very similar to their original nft_rule_append and nft_rule_insert. Signed-off-by: Pablo Neira Ayuso --- iptables/xtables-arp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'iptables/xtables-arp.c') diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index 4b3b0461..91876174 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -884,12 +884,11 @@ append_entry(struct nft_handle *h, for (j = 0; j < ndaddrs; j++) { fw->arp.tgt.s_addr = daddrs[j].s_addr; if (append) { - ret = nft_arp_rule_append(h, chain, table, - fw, verbose); + ret = nft_rule_append(h, chain, table, fw, 0, + verbose); } else { - ret = nft_arp_rule_insert(h, chain, table, - fw, rulenum, - verbose); + ret = nft_rule_insert(h, chain, table, fw, + rulenum, verbose); } } } -- cgit v1.2.3