All of lore.kernel.org
 help / color / mirror / Atom feed
From: Changli Gao <xiaosuo@gmail.com>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org, Changli Gao <xiaosuo@gmail.com>
Subject: [PATCH iptables] libxt_quota: don't ignore the quota value on deletion
Date: Sat, 24 Jul 2010 12:30:44 +0800	[thread overview]
Message-ID: <1279945844-24068-1-git-send-email-xiaosuo@gmail.com> (raw)

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

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 extensions/libxt_quota.c           |    2 +-
 include/linux/netfilter/xt_quota.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c
index ac7c686..8e28e4c 100644
--- a/extensions/libxt_quota.c
+++ b/extensions/libxt_quota.c
@@ -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,
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h
index 8dc89df..b0d28c6 100644
--- a/include/linux/netfilter/xt_quota.h
+++ b/include/linux/netfilter/xt_quota.h
@@ -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;
 };
 

             reply	other threads:[~2010-07-24  4:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-24  4:30 Changli Gao [this message]
2010-08-02 16:03 ` [PATCH iptables] libxt_quota: don't ignore the quota value on deletion Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279945844-24068-1-git-send-email-xiaosuo@gmail.com \
    --to=xiaosuo@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.