]> git.ipfire.org Git - thirdparty/linux.git/blame - net/netfilter/xt_comment.c
fs: indicate request originates from old mount API
[thirdparty/linux.git] / net / netfilter / xt_comment.c
CommitLineData
09c434b8 1// SPDX-License-Identifier: GPL-2.0-only
1da177e4
LT
2/*
3 * Implements a dummy match to allow attaching comments to rules
4 *
5 * 2003-05-13 Brad Fisher (brad@info-link.net)
6 */
7
8#include <linux/module.h>
9#include <linux/skbuff.h>
2e4e6a17
HW
10#include <linux/netfilter/x_tables.h>
11#include <linux/netfilter/xt_comment.h>
1da177e4
LT
12
13MODULE_AUTHOR("Brad Fisher <brad@info-link.net>");
2ae15b64 14MODULE_DESCRIPTION("Xtables: No-op match which can be tagged with a comment");
1da177e4 15MODULE_LICENSE("GPL");
2e4e6a17
HW
16MODULE_ALIAS("ipt_comment");
17MODULE_ALIAS("ip6t_comment");
1da177e4 18
1d93a9cb 19static bool
62fc8051 20comment_mt(const struct sk_buff *skb, struct xt_action_param *par)
1da177e4
LT
21{
22 /* We always match */
1d93a9cb 23 return true;
1da177e4
LT
24}
25
ab4f21e6
JE
26static struct xt_match comment_mt_reg __read_mostly = {
27 .name = "comment",
28 .revision = 0,
29 .family = NFPROTO_UNSPEC,
30 .match = comment_mt,
31 .matchsize = sizeof(struct xt_comment_info),
32 .me = THIS_MODULE,
1da177e4
LT
33};
34
d3c5ee6d 35static int __init comment_mt_init(void)
1da177e4 36{
ab4f21e6 37 return xt_register_match(&comment_mt_reg);
1da177e4
LT
38}
39
d3c5ee6d 40static void __exit comment_mt_exit(void)
1da177e4 41{
ab4f21e6 42 xt_unregister_match(&comment_mt_reg);
1da177e4
LT
43}
44
d3c5ee6d
JE
45module_init(comment_mt_init);
46module_exit(comment_mt_exit);