]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_quota: don't ignore the quota value on deletion
authorChangli Gao <xiaosuo@gmail.com>
Mon, 2 Aug 2010 16:03:20 +0000 (18:03 +0200)
committerPatrick McHardy <kaber@trash.net>
Mon, 2 Aug 2010 16:03:20 +0000 (18:03 +0200)
Don't ignore the quota value on deletion, then we can remove a special
rule everytime.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
extensions/libxt_quota.c
include/linux/netfilter/xt_quota.h

index b6bab93a9e7c897678d70f1da3bf0f6b6c61d6da..cfd975d04d444abc4107a6e472edcc3cad6159c0 100644 (file)
@@ -83,7 +83,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,
index 8dc89dfc1361761578ef2c73fd6dcdce74327f0f..b0d28c659ab75c7a87aa9e4cb956c516bf5aeaf1 100644 (file)
@@ -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;
 };