On Sat, 2016-12-10 at 15:25 +0100, Pablo Neira Ayuso wrote: > On Sat, Dec 10, 2016 at 03:16:55PM +0100, Pablo Neira Ayuso wrote: = > > - nft_counter_fetch(priv, &total, reset); > + nft_counter_fetch(priv, &total); > + if (reset) > + nft_counter_reset(priv, &total); > > if (nla_put_be64(skb, NFTA_COUNTER_BYTES, > cpu_to_be64(total.bytes), > NFTA_COUNTER_PAD) ||
Night be nitpicking, but you might reset the stats only if the nla_put_be64() succeeded. But regardless of this detail, patch looks good and is very close to the one I cooked and was about to send this morning. Thanks Pablo !