From: Jan Engelhardt Date: Mon, 22 Jun 2009 12:16:45 +0000 (+0200) Subject: netfilter: xt_quota: fix incomplete initialization X-Git-Tag: upstream/snapshot3+hdmi~18292^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d62182fea6cc6bbc8d82a691ad0608d68a54aeb;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git netfilter: xt_quota: fix incomplete initialization Commit v2.6.29-rc5-872-gacc738f ("xtables: avoid pointer to self") forgot to copy the initial quota value supplied by iptables into the private structure, thus counting from whatever was in the memory kmalloc returned. Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy --- diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 01dd07b..98fc190 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c @@ -54,6 +54,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par) if (q->master == NULL) return -ENOMEM; + q->master->quota = q->quota; return true; }