netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nfacct: setting quotas does not seem to work.
@ 2016-08-11 14:00 Josue Alvarez
  2016-08-17 22:44 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: Josue Alvarez @ 2016-08-11 14:00 UTC (permalink / raw)
  To: netfilter-devel

Hi,

I tried to play a little bit with the quota features of the extended 
accounting infrastructure.
However, it seemed that the quotas were not registered when creating the 
accounting objects.

Example :
# nfacct add testquota packet 5
# iptables -I OUTPUT -p icmp -m nfacct --nfacct-name testquota
# nfacct get testquota
{ pkts = 00000000000000000000, bytes = 00000000000000000000 } = testquota;

When I ping the machine, I see the counters go above 5 packets, however 
I get no output when running :
# nfacct monitor

After a little bit of investigation in the code of nfacct, I checked 
that the NFACCT_ATTR_FLAGS and NFACCT_ATTR_QUOTA attributes were set. (i 
managed to call _nfacct_cmd_add with flags=NFACCT_F_QUOTA_PKTS).

However, the kernel code in netfilter/net/nfnetlink_acct.c somehow did 
not "get" the flags : the execution didn't enter in the  "if 
(tb[NFACCT_FLAGS]) { ... }" in nfnl_acct_new(). (checked that using printk).

Any idea how this could happen ?

Thanks :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-19  6:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-11 14:00 nfacct: setting quotas does not seem to work Josue Alvarez
2016-08-17 22:44 ` Pablo Neira Ayuso
2016-08-18  7:34   ` Josue Alvarez
2016-08-18 14:54     ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).