Re: xtables-addons: patch for addition of "no-change" option for xt_quota2

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

 



On Monday 2009-12-28 16:23, Michael Farrell wrote:
>
>I've written a patch to add an option to xt_quota2 called "no-change".
>The effect of this option, while it is enabled, is that it will skip
>incrementing or decrementing the quota counter.

I applied the patch, with a number of changes.

>diff --git a/extensions/libxt_quota2.c b/extensions/libxt_quota2.c
>index db144f9..4bbb04b 100644
>--- a/extensions/libxt_quota2.c
>+++ b/extensions/libxt_quota2.c
> static struct xtables_match quota_mt2_reg = {
> 	.family        = AF_UNSPEC,
>-	.revision      = 3,
>+	.revision      = 4,
> 	.name          = "quota2",
> 	.version       = XTABLES_VERSION,
> 	.size          = XT_ALIGN(sizeof (struct xt_quota_mtinfo2)),

The revision number is usually only bumped when a module is imported
from another source. Within changes inside Xt-a there is no need to
bump it, since Xt-a is always upgraded wholesale.

>index fbc8aab..a34dfbf 100644
>--- a/extensions/xt_quota2.c
>+++ b/extensions/xt_quota2.c
>@@ -3,6 +3,8 @@
>  * as a minimal accounting match.
>  * by Jan Engelhardt <jengelh@xxxxxxxxxx>, 2008
>  *
>+ * no-change option added by Michael Farrell <micolous+nf@xxxxxxxxx>, 2009
>+ *
>  * Originally based on xt_quota.c:
>  * 	netfilter module to enforce network quotas
>  * 	Sam Johnston <samj@xxxxxxxx>

History goes into the git log, so I moved this out. What is in the files
usually is historic content or original authorship information.

>@@ -264,6 +271,7 @@ module_exit(quota_mt2_exit);
> MODULE_DESCRIPTION("Xtables: countdown quota match; up counter");
> MODULE_AUTHOR("Sam Johnston <samj@xxxxxxxx>");
> MODULE_AUTHOR("Jan Engelhardt <jengelh@xxxxxxxxxx>");
>+MODULE_AUTHOR("Michael Farrell <micolous+nf@xxxxxxxxx>");
> MODULE_LICENSE("GPL");
> MODULE_ALIAS("ipt_quota2");
> MODULE_ALIAS("ip6t_quota2");

I removed this one too since you are not going to take the maintainership
blame if something goes wrong ;-)


Applied as such.

--
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