2 * Implements a dummy match to allow attaching comments to rules
4 * 2003-05-13 Brad Fisher (brad@info-link.net)
7 #include <linux/module.h>
8 #include <linux/skbuff.h>
9 #include <linux/netfilter/x_tables.h>
10 #include <linux/netfilter/xt_comment.h>
12 MODULE_AUTHOR("Brad Fisher <brad@info-link.net>");
13 MODULE_DESCRIPTION("iptables comment match module");
14 MODULE_LICENSE("GPL");
15 MODULE_ALIAS("ipt_comment");
16 MODULE_ALIAS("ip6t_comment");
19 match(const struct sk_buff *skb,
20 const struct net_device *in,
21 const struct net_device *out,
22 const struct xt_match *match,
23 const void *matchinfo,
25 unsigned int protooff,
32 static struct xt_match comment_match = {
35 .matchsize = sizeof(struct xt_comment_info),
39 static struct xt_match comment6_match = {
42 .matchsize = sizeof(struct xt_comment_info),
46 static int __init init(void)
50 ret = xt_register_match(AF_INET, &comment_match);
54 ret = xt_register_match(AF_INET6, &comment6_match);
56 xt_unregister_match(AF_INET, &comment_match);
61 static void __exit fini(void)
63 xt_unregister_match(AF_INET, &comment_match);
64 xt_unregister_match(AF_INET6, &comment6_match);