summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-events.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-10-08 22:17:51 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-10-09 13:04:30 +0200
commitab1e03849d7fb60e861b9715d90681f7120c3bbb (patch)
treee9ebf3e38f1ee3cb7c24a9b253da2e98f8db67bb /iptables/xtables-events.c
parent3d2e3c1838bf728e6b88912a77b0f9d8535f011b (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-events.c')
-rw-r--r--iptables/xtables-events.c7
1 files changed, 4 insertions, 3 deletions
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;