From ab1e03849d7fb60e861b9715d90681f7120c3bbb Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 8 Oct 2014 22:17:51 +0200 Subject: arptables-compat: allow to not specify a target arptables allows this: # arptables -I INPUT however, arptables-compat says: arptables v1.4.21: No target provided or initalization failed Try `arptables -h' or 'arptables --help' for more information. the compat utility must mimic the same behaviour. Fix this by introducing the arptables_command_state abstraction that is already available in ip{6}tables. Signed-off-by: Pablo Neira Ayuso --- iptables/nft-shared.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'iptables/nft-shared.h') diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index c3832929..aa97b846 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -47,7 +47,7 @@ enum { struct nft_xt_ctx { union { struct iptables_command_state *cs; - struct arpt_entry *fw; + struct arptables_command_state *cs_arp; } state; struct nft_rule_expr_iter *iter; int family; @@ -204,19 +204,4 @@ struct xtables_args { #define CMD_ZERO_NUM 0x2000U #define CMD_CHECK 0x4000U -/* - * ARP - */ -extern char *opcodes[]; -#define NUMOPCODES 9 - -static inline struct xt_entry_target *nft_arp_get_target(struct arpt_entry *fw) -{ - struct xt_entry_target **target; - - target = (void *) &fw->elems; - - return *target; -} - #endif -- cgit v1.2.3