mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-06 12:45:13 +02:00
fuzzy: IPv6 support
This commit is contained in:
@@ -38,6 +38,7 @@ MODULE_AUTHOR("Hime Aguiar e Oliveira Junior <hime@engineer.com>");
|
|||||||
MODULE_DESCRIPTION("Xtables: Fuzzy Logic Controller match");
|
MODULE_DESCRIPTION("Xtables: Fuzzy Logic Controller match");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_ALIAS("ipt_fuzzy");
|
MODULE_ALIAS("ipt_fuzzy");
|
||||||
|
MODULE_ALIAS("ip6t_fuzzy");
|
||||||
|
|
||||||
static uint8_t mf_high(uint32_t tx, uint32_t mini, uint32_t maxi)
|
static uint8_t mf_high(uint32_t tx, uint32_t mini, uint32_t maxi)
|
||||||
{
|
{
|
||||||
@@ -143,24 +144,35 @@ fuzzy_mt_check(const char *table, const void *ip, const struct xt_match *match,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct xt_match fuzzy_mt_reg = {
|
static struct xt_match fuzzy_mt_reg[] __read_mostly = {
|
||||||
.name = "fuzzy",
|
{
|
||||||
.revision = 0,
|
.name = "fuzzy",
|
||||||
.family = PF_INET,
|
.revision = 0,
|
||||||
.match = fuzzy_mt,
|
.family = PF_INET,
|
||||||
.checkentry = fuzzy_mt_check,
|
.match = fuzzy_mt,
|
||||||
.matchsize = XT_ALIGN(sizeof(struct xt_fuzzy_mtinfo)),
|
.checkentry = fuzzy_mt_check,
|
||||||
.me = THIS_MODULE,
|
.matchsize = XT_ALIGN(sizeof(struct xt_fuzzy_mtinfo)),
|
||||||
|
.me = THIS_MODULE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "fuzzy",
|
||||||
|
.revision = 0,
|
||||||
|
.family = PF_INET6,
|
||||||
|
.match = fuzzy_mt,
|
||||||
|
.checkentry = fuzzy_mt_check,
|
||||||
|
.matchsize = XT_ALIGN(sizeof(struct xt_fuzzy_mtinfo)),
|
||||||
|
.me = THIS_MODULE,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init fuzzy_mt_init(void)
|
static int __init fuzzy_mt_init(void)
|
||||||
{
|
{
|
||||||
return xt_register_match(&fuzzy_mt_reg);
|
return xt_register_matches(fuzzy_mt_reg, ARRAY_SIZE(fuzzy_mt_reg));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit fuzzy_mt_exit(void)
|
static void __exit fuzzy_mt_exit(void)
|
||||||
{
|
{
|
||||||
xt_unregister_match(&fuzzy_mt_reg);
|
xt_unregister_matches(fuzzy_mt_reg, ARRAY_SIZE(fuzzy_mt_reg));
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(fuzzy_mt_init);
|
module_init(fuzzy_mt_init);
|
||||||
|
Reference in New Issue
Block a user