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/xtables-events.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'iptables/xtables-events.c') diff --git a/iptables/xtables-events.c b/iptables/xtables-events.c index 1e0b1752..5aa7c6f0 100644 --- a/iptables/xtables-events.c +++ b/iptables/xtables-events.c @@ -27,6 +27,7 @@ #include "iptables.h" /* for xtables_globals */ #include "xtables-multi.h" #include "nft.h" +#include "nft-arp.h" static int table_cb(const struct nlmsghdr *nlh, int type) { @@ -55,7 +56,7 @@ static bool counters; static int rule_cb(const struct nlmsghdr *nlh, int type) { struct iptables_command_state cs = {}; - struct arpt_entry fw_arp = {}; + struct arptables_command_state cs_arp = {}; struct nft_rule *r; void *fw = NULL; uint8_t family; @@ -77,8 +78,8 @@ static int rule_cb(const struct nlmsghdr *nlh, int type) break; case NFPROTO_ARP: printf("-0 "); - nft_rule_to_arpt_entry(r, &fw_arp); - fw = &fw_arp; + nft_rule_to_arptables_command_state(r, &cs_arp); + fw = &cs_arp; break; default: goto err_free; -- cgit v1.2.3