提交 49daf6a2 编写于 作者: C Changli Gao 提交者: Patrick McHardy

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: NChangli Gao <xiaosuo@gmail.com>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
上级 b0c81aa5
......@@ -11,9 +11,9 @@ struct xt_quota_priv;
struct xt_quota_info {
u_int32_t flags;
u_int32_t pad;
aligned_u64 quota;
/* Used internally by the kernel */
aligned_u64 quota;
struct xt_quota_priv *master;
};
......
......@@ -36,8 +36,6 @@ quota_mt(const struct sk_buff *skb, struct xt_action_param *par)
/* we do not allow even small packets from now on */
priv->quota = 0;
}
/* Copy quota back to matchinfo so that iptables can display it */
q->quota = priv->quota;
spin_unlock_bh(&priv->lock);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册