]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_quota: dump consumed quota
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 27 Nov 2016 23:05:52 +0000 (00:05 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Dec 2016 11:54:22 +0000 (12:54 +0100)
commitaf63ed7f22f9300889404e63686b492082772c20
tree37a41411dd3ff65cbb8098626ce61870da48098d
parent901d6abbf3f589e961248febc20c2525cf91fb27
netfilter: nft_quota: dump consumed quota

Add a new attribute NFTA_QUOTA_CONSUMED that displays the amount of
quota that has been already consumed. This allows us to restore the
internal state of the quota object between reboots as well as to monitor
how wasted it is.

This patch changes the logic to account for the consumed bytes, instead
of the bytes that remain to be consumed.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nft_quota.c