|
|
@@ -57,25 +57,39 @@ nfacct_mt_destroy(const struct xt_mtdtor_param *par)
|
|
|
nfnl_acct_put(info->nfacct);
|
|
|
}
|
|
|
|
|
|
-static struct xt_match nfacct_mt_reg __read_mostly = {
|
|
|
- .name = "nfacct",
|
|
|
- .family = NFPROTO_UNSPEC,
|
|
|
- .checkentry = nfacct_mt_checkentry,
|
|
|
- .match = nfacct_mt,
|
|
|
- .destroy = nfacct_mt_destroy,
|
|
|
- .matchsize = sizeof(struct xt_nfacct_match_info),
|
|
|
- .usersize = offsetof(struct xt_nfacct_match_info, nfacct),
|
|
|
- .me = THIS_MODULE,
|
|
|
+static struct xt_match nfacct_mt_reg[] __read_mostly = {
|
|
|
+ {
|
|
|
+ .name = "nfacct",
|
|
|
+ .revision = 0,
|
|
|
+ .family = NFPROTO_UNSPEC,
|
|
|
+ .checkentry = nfacct_mt_checkentry,
|
|
|
+ .match = nfacct_mt,
|
|
|
+ .destroy = nfacct_mt_destroy,
|
|
|
+ .matchsize = sizeof(struct xt_nfacct_match_info),
|
|
|
+ .usersize = offsetof(struct xt_nfacct_match_info, nfacct),
|
|
|
+ .me = THIS_MODULE,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .name = "nfacct",
|
|
|
+ .revision = 1,
|
|
|
+ .family = NFPROTO_UNSPEC,
|
|
|
+ .checkentry = nfacct_mt_checkentry,
|
|
|
+ .match = nfacct_mt,
|
|
|
+ .destroy = nfacct_mt_destroy,
|
|
|
+ .matchsize = sizeof(struct xt_nfacct_match_info_v1),
|
|
|
+ .usersize = offsetof(struct xt_nfacct_match_info_v1, nfacct),
|
|
|
+ .me = THIS_MODULE,
|
|
|
+ },
|
|
|
};
|
|
|
|
|
|
static int __init nfacct_mt_init(void)
|
|
|
{
|
|
|
- return xt_register_match(&nfacct_mt_reg);
|
|
|
+ return xt_register_matches(nfacct_mt_reg, ARRAY_SIZE(nfacct_mt_reg));
|
|
|
}
|
|
|
|
|
|
static void __exit nfacct_mt_exit(void)
|
|
|
{
|
|
|
- xt_unregister_match(&nfacct_mt_reg);
|
|
|
+ xt_unregister_matches(nfacct_mt_reg, ARRAY_SIZE(nfacct_mt_reg));
|
|
|
}
|
|
|
|
|
|
module_init(nfacct_mt_init);
|