mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 19:44:56 +02:00
quota2: add a no-change mode
This commit adds an option to xt_quota2 called "no-change". The effect of this option, when used, is that it will skip incrementing or decrementing the quota counter, effectively providing a quota test only. The reason for implementing this is so that I could have a rule check if quota is available for a rule in the PREROUTING tables, without actually decrementing the amount of available quota. I only wanted to decrement the amount of available quota in the FORWARD rule. Otherwise, the first packet of every connection would be counted twice.
This commit is contained in:

committed by
Jan Engelhardt

parent
c82da14d2b
commit
7952a7d253
@@ -2,10 +2,11 @@
|
||||
#define _XT_QUOTA_H
|
||||
|
||||
enum xt_quota_flags {
|
||||
XT_QUOTA_INVERT = 1 << 0,
|
||||
XT_QUOTA_GROW = 1 << 1,
|
||||
XT_QUOTA_PACKET = 1 << 2,
|
||||
XT_QUOTA_MASK = 0x7,
|
||||
XT_QUOTA_INVERT = 1 << 0,
|
||||
XT_QUOTA_GROW = 1 << 1,
|
||||
XT_QUOTA_PACKET = 1 << 2,
|
||||
XT_QUOTA_NO_CHANGE = 1 << 3,
|
||||
XT_QUOTA_MASK = 0x0F,
|
||||
};
|
||||
|
||||
struct xt_quota_counter;
|
||||
|
Reference in New Issue
Block a user