netfilter: xt_quota: fix incomplete initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Affects mainline and 2.6.30.

parent 167b2cd72bca6ca1cb3cf6a05d212cf11d65e08d (v2.6.30-rc6-1344-g167b2cd)
commit 93739b7ba1bbfdb010417a89fd72e08ae29890cc
Author: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date:   Thu Jun 18 06:47:44 2009 +0200

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 <jengelh@xxxxxxxxxx>
---
 net/netfilter/xt_quota.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;
 }
 
-- 
# Created with git-export-patch

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux