Subject: netfilter -stable 05/08: xt_quota: fix incomplete initialization

From: Patrick McHardy <[email-masked]>
Date: Thu, 23 Jul 2009 16:15:31 +0200 (MEST)

commit 60cc46b2f32e6829efa4067914da11e4d64f421a
Author: Patrick McHardy <[email-masked]>
Date:   Fri Jul 3 10:35:12 2009 +0200

    netfilter: xt_quota: fix incomplete initialization
    
    Upstream commit 6d62182f:
    
    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 <[email-masked]>
    Signed-off-by: Patrick McHardy <[email-masked]>

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;
 }