-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathlibxt_dnsblock.c
58 lines (47 loc) · 1.27 KB
/
libxt_dnsblock.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* SPDX-FileCopyrightText: (c) 2024 Mohammad Shehar Yaar Tausif <[email protected]>
* SPDX-License-Identifier: MIT OR GPL-2.0-only
*/
#include <xtables.h>
#include <linux/netfilter.h>
#include "luaxtable.h"
static void dnsblock_mt_help(void)
{
}
static void dnsblock_mt_init(struct xt_entry_match *match)
{
}
static int dnsblock_mt_parse(int c, char **argv, int invert,
unsigned int *flags, const void *entry, struct xt_entry_match **match)
{
return true;
}
static void dnsblock_mt_check(unsigned int flags)
{
}
static void dnsblock_mt_print(const void *entry,
const struct xt_entry_match *match, int numeric)
{
}
static void dnsblock_mt_save(const void *entry,
const struct xt_entry_match *match)
{
}
static struct xtables_match dnsblock_mt_reg = {
.version = XTABLES_VERSION,
.name = "dnsblock",
.revision = 1,
.family = NFPROTO_UNSPEC,
.size = XT_ALIGN(sizeof(luaxtable_info_t)),
.userspacesize = 0,
.help = dnsblock_mt_help,
.init = dnsblock_mt_init,
.parse = dnsblock_mt_parse,
.final_check = dnsblock_mt_check,
.print = dnsblock_mt_print,
.save = dnsblock_mt_save,
};
static void __attribute__((constructor)) _init(void)
{
xtables_register_match(&dnsblock_mt_reg);
}