]> 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)
commit2184cea8c265def65579bdfef8efeb8465772f4a
tree37a41411dd3ff65cbb8098626ce61870da48098d
parent1de3d0d662b2658ae5150f2617f65ac4579c2654
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