Skip to content
Commit e9837e55 authored by Chenbo Feng's avatar Chenbo Feng Committed by Pablo Neira Ayuso
Browse files

netfilter: xt_quota: fix the behavior of xt_quota module



A major flaw of the current xt_quota module is that quota in a specific
rule gets reset every time there is a rule change in the same table. It
makes the xt_quota module not very useful in a table in which iptables
rules are changed at run time. This fix introduces a new counter that is
visible to userspace as the remaining quota of the current rule. When
userspace restores the rules in a table, it can restore the counter to
the remaining quota instead of resetting it to the full quota.

Signed-off-by: default avatarChenbo Feng <fengc@google.com>
Suggested-by: default avatarMaciej Żenczykowski <maze@google.com>
Reviewed-by: default avatarMaciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent a2d88182
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment