]> git.hungrycats.org Git - linux/commitdiff
netfilter: xt_quota: fix incomplete initialization
authorJan Engelhardt <jengelh@medozas.de>
Mon, 22 Jun 2009 12:16:45 +0000 (14:16 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 30 Jul 2009 21:40:25 +0000 (14:40 -0700)
commit 6d62182fea6cc6bbc8d82a691ad0608d68a54aeb upstream.

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 <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/xt_quota.c

index 01dd07b764ec46de6d82baec2625500bee2c714d..98fc190e8f0eed8683e9836b6be1567ecea74382 100644 (file)
@@ -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;
 }