Skip to contentSkip to conversation

libxt_quota: don't ignore the quota value on deletion

PATCH Applied Changli Gao 2 participants 2 messages Jul 24, 2010 – Aug 2, 2010 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxt_quota: don't ignore the quota value on deletion

don't ignore the quota value on deletion, then we can remove a special rule everytime.

----

 extensions/libxt_quota.c           |    2 +-
 include/linux/netfilter/xt_quota.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
extensions/libxt_quota.c +1 -1
index ac7c686..8e28e4c 100644
@@ -82,7 +82,7 @@ static struct xtables_match quota_match = {
 	.name		= "quota",
 	.version	= XTABLES_VERSION,
 	.size		= XT_ALIGN(sizeof (struct xt_quota_info)),
-	.userspacesize	= offsetof(struct xt_quota_info, quota),
+	.userspacesize	= offsetof(struct xt_quota_info, master),
 	.help		= quota_help,
 	.parse		= quota_parse,
 	.print		= quota_print,
include/linux/netfilter/xt_quota.h +1 -1
index 8dc89df..b0d28c6 100644
@@ -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;
 };
 
#1 lore raw
Quoted 2 lines · Changli Gao

don't ignore the quota value on deletion, then we can remove a special rule everytime.

Applied to iptables-next, thanks.