Blame view
net/netfilter/xt_comment.c
1.03 KB
1da177e4c
|
1 2 3 4 5 6 7 8 |
/* * Implements a dummy match to allow attaching comments to rules * * 2003-05-13 Brad Fisher (brad@info-link.net) */ #include <linux/module.h> #include <linux/skbuff.h> |
2e4e6a17a
|
9 10 |
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/xt_comment.h> |
1da177e4c
|
11 12 |
MODULE_AUTHOR("Brad Fisher <brad@info-link.net>"); |
2ae15b64e
|
13 |
MODULE_DESCRIPTION("Xtables: No-op match which can be tagged with a comment"); |
1da177e4c
|
14 |
MODULE_LICENSE("GPL"); |
2e4e6a17a
|
15 16 |
MODULE_ALIAS("ipt_comment"); MODULE_ALIAS("ip6t_comment"); |
1da177e4c
|
17 |
|
1d93a9cba
|
18 |
static bool |
62fc80510
|
19 |
comment_mt(const struct sk_buff *skb, struct xt_action_param *par) |
1da177e4c
|
20 21 |
{ /* We always match */ |
1d93a9cba
|
22 |
return true; |
1da177e4c
|
23 |
} |
ab4f21e6f
|
24 25 26 27 28 29 30 |
static struct xt_match comment_mt_reg __read_mostly = { .name = "comment", .revision = 0, .family = NFPROTO_UNSPEC, .match = comment_mt, .matchsize = sizeof(struct xt_comment_info), .me = THIS_MODULE, |
1da177e4c
|
31 |
}; |
d3c5ee6d5
|
32 |
static int __init comment_mt_init(void) |
1da177e4c
|
33 |
{ |
ab4f21e6f
|
34 |
return xt_register_match(&comment_mt_reg); |
1da177e4c
|
35 |
} |
d3c5ee6d5
|
36 |
static void __exit comment_mt_exit(void) |
1da177e4c
|
37 |
{ |
ab4f21e6f
|
38 |
xt_unregister_match(&comment_mt_reg); |
1da177e4c
|
39 |
} |
d3c5ee6d5
|
40 41 |
module_init(comment_mt_init); module_exit(comment_mt_exit); |