Commit
49daf6a22622d4e1619aeaad5f9f0472bf89daff
Exists in
master
and in
20 other branches
dlt-processor-sdk-linux-03.00.00.04, newt-ti-linux-3.12.y, processor-sdk-linux-01.00.00, processor-sdk-linux-02.00.01, smarc-ti-linux-3.12.10, smarc-ti-linux-3.12.y, smarc-ti-linux-3.14.y, smarc-ti-linux-3.15.y, smarc-ti-lsk-linux-4.1.y, smarct3x-processor-sdk-04.01.00.06, smarct3x-processor-sdk-linux-02.00.01, smarct3x-processor-sdk-linux-03.00.00.04, smarct4x-800-processor-sdk-linux-02.00.01, smarct4x-processor-sdk-04.01.00.06, smarct4x-processor-sdk-linux-02.00.01, smarct4x-processor-sdk-linux-03.00.00.04, ti-linux-3.12.y, ti-linux-3.14.y, ti-linux-3.15.y, ti-lsk-linux-4.1.y
xt_quota: report initial quota value instead of current value to userspace
We should copy the initial value to userspace for iptables-save and
to allow removal of specific quota rules.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Showing
2 changed files
with
1 additions
and
3 deletions
Side-by-side Diff
... |
... |
@@ -11,9 +11,9 @@ |
11
|
11 |
struct xt_quota_info { |
12
|
12 |
u_int32_t flags; |
13
|
13 |
u_int32_t pad; |
|
14 |
+ aligned_u64 quota; |
14
|
15 |
|
15
|
16 |
/* Used internally by the kernel */ |
16
|
|
- aligned_u64 quota; |
17
|
17 |
struct xt_quota_priv *master; |
18
|
18 |
}; |
19
|
19 |
|
... |
... |
@@ -36,8 +36,6 @@ |
36
|
36 |
/* we do not allow even small packets from now on */ |
37
|
37 |
priv->quota = 0; |
38
|
38 |
} |
39
|
|
- /* Copy quota back to matchinfo so that iptables can display it */ |
40
|
|
- q->quota = priv->quota; |
41
|
39 |
spin_unlock_bh(&priv->lock); |
42
|
40 |
|
43
|
41 |
return ret; |