]> git.ipfire.org Git - thirdparty/iptables.git/commit
extensions: libxt_quota: Allow setting the remaining quota
authorChenbo Feng <fengc@google.com>
Tue, 2 Oct 2018 01:23:07 +0000 (18:23 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Oct 2018 23:14:30 +0000 (01:14 +0200)
commit0a8f2bcadff157489a737f8cc8846adcb750b91f
treeca58c1dca192c6ce765130cd707314ac77d26672
parentb373a91b24c4bb1074f304bc74ce2f361c818a5a
extensions: libxt_quota: Allow setting the remaining quota

The current xt_quota module cannot track the current remaining quota
of a specific rule. Everytime an unrelated rule is updated in the same
iptables table, the quota will be reset. This is not a very useful
function for iptables that get changed at run time. This patch fixes the
above problem by adding a new field in the struct that records the
current remaining quota.

Fixed a print out bug in verbose print out wrt. inversion.

Signed-off-by: Chenbo Feng <fengc@google.com>
Suggested-by: Maciej Żenczykowski <maze@google.com>
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_quota.c
include/linux/netfilter/xt_quota.h