printf("\n");
}
+static void nft_arp_init_cs(struct iptables_command_state *cs);
+
static void
nft_arp_print_rule(struct nft_handle *h, struct nftnl_rule *r,
unsigned int num, unsigned int format)
if (format & FMT_LINENUMBERS)
printf("%u ", num);
+ nft_arp_init_cs(&cs);
nft_rule_to_iptables_command_state(h, r, &cs);
nft_arp_print_rule_details(&cs, format);
struct nft_family_ops *ops = h->ops;
bool ret;
+ if (ops->init_cs)
+ ops->init_cs(&cs);
ret = ops->rule_to_cs(h, r, &cs);
if (!(format & (FMT_NOCOUNTS | FMT_C_COUNTS)))
struct iptables_command_state _cs = {}, this = {}, *cs = &_cs;
bool ret = false, ret_this, ret_that;
+ if (h->ops->init_cs) {
+ h->ops->init_cs(&this);
+ h->ops->init_cs(cs);
+ }
+
ret_this = h->ops->rule_to_cs(h, r, &this);
ret_that = h->ops->rule_to_cs(h, rule, cs);
(unsigned long long)
nftnl_rule_get_u64(r, NFTNL_RULE_HANDLE));
+ if (h->ops->init_cs)
+ h->ops->init_cs(&cs);
h->ops->rule_to_cs(h, r, &cs);
if (counter_op & CTR_OP_INC_PKTS)
goto error;
}
+ if (h->ops->init_cs)
+ h->ops->init_cs(&cs);
h->ops->rule_to_cs(h, r, &cs);
cs.counters.pcnt = cs.counters.bcnt = 0;
new_rule = nft_rule_new(h, &ctx, chain, table, &cs);