History

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.

Changli Gao committed 16 years ago

Commit 49daf6a1 parent b0c81aa2 files · +1 −3Browse files

Unified · Split

2 files
  1. include/linux/netfilter/xt_quota.h +1 −1
  2. net/netfilter/xt_quota.c +0 −2
include/linux/netfilter/xt_quota.h+1−1
@@ -11,9 +11,9 @@ struct xt_quota_priv; · 10 unmodified lines
11struct xt_quota_info {11struct xt_quota_info {
12 u_int32_t flags;12 u_int32_t flags;
13 u_int32_t pad;13 u_int32_t pad;
14 aligned_u64 quota;
14 15
15 /* Used internally by the kernel */16 /* Used internally by the kernel */
16 aligned_u64 quota;
17 struct xt_quota_priv *master;17 struct xt_quota_priv *master;
18};18};
19 19
net/netfilter/xt_quota.c+0−2
@@ -36,8 +36,6 @@ quota_mt(const struct sk_buff *skb, struct xt_action_param *par) · 35 unmodified lines
36 /* we do not allow even small packets from now on */36 /* we do not allow even small packets from now on */
37 priv->quota = 0;37 priv->quota = 0;
38 }38 }
39 /* Copy quota back to matchinfo so that iptables can display it */
40 q->quota = priv->quota;
41 spin_unlock_bh(&priv->lock);39 spin_unlock_bh(&priv->lock);
42 40
43 return ret;41 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t