blob: cc451ef9593dc444f5afd4b0b75cbe966b188edc [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/extensions/libxt_conntrack.c
2+++ b/extensions/libxt_conntrack.c
3@@ -1395,6 +1395,7 @@ static int conntrack3_mt6_xlate(struct x
4 }
5
6 static struct xtables_match conntrack_mt_reg[] = {
7+#ifndef NO_LEGACY
8 {
9 .version = XTABLES_VERSION,
10 .name = "conntrack",
11@@ -1470,6 +1471,7 @@ static struct xtables_match conntrack_mt
12 .alias = conntrack_print_name_alias,
13 .x6_options = conntrack2_mt_opts,
14 },
15+#endif
16 {
17 .version = XTABLES_VERSION,
18 .name = "conntrack",
19@@ -1502,6 +1504,7 @@ static struct xtables_match conntrack_mt
20 .x6_options = conntrack3_mt_opts,
21 .xlate = conntrack3_mt6_xlate,
22 },
23+#ifndef NO_LEGACY
24 {
25 .family = NFPROTO_UNSPEC,
26 .name = "state",
27@@ -1532,6 +1535,8 @@ static struct xtables_match conntrack_mt
28 .x6_parse = state_ct23_parse,
29 .x6_options = state_opts,
30 },
31+#endif
32+#ifndef NO_LEGACY
33 {
34 .family = NFPROTO_UNSPEC,
35 .name = "state",
36@@ -1561,6 +1566,7 @@ static struct xtables_match conntrack_mt
37 .x6_parse = state_parse,
38 .x6_options = state_opts,
39 },
40+#endif
41 };
42
43 void _init(void)
44--- a/extensions/libxt_CT.c
45+++ b/extensions/libxt_CT.c
46@@ -363,6 +363,7 @@ static int xlate_ct1_tg(struct xt_xlate
47 }
48
49 static struct xtables_target ct_target_reg[] = {
50+#ifndef NO_LEGACY
51 {
52 .family = NFPROTO_UNSPEC,
53 .name = "CT",
54@@ -388,6 +389,7 @@ static struct xtables_target ct_target_r
55 .x6_parse = ct_parse_v1,
56 .x6_options = ct_opts_v1,
57 },
58+#endif
59 {
60 .family = NFPROTO_UNSPEC,
61 .name = "CT",
62@@ -403,6 +405,7 @@ static struct xtables_target ct_target_r
63 .x6_options = ct_opts_v1,
64 .xlate = xlate_ct1_tg,
65 },
66+#ifndef NO_LEGACY
67 {
68 .family = NFPROTO_UNSPEC,
69 .name = "NOTRACK",
70@@ -441,6 +444,7 @@ static struct xtables_target ct_target_r
71 .revision = 0,
72 .version = XTABLES_VERSION,
73 },
74+#endif
75 };
76
77 void _init(void)
78--- a/extensions/libxt_multiport.c
79+++ b/extensions/libxt_multiport.c
80@@ -571,6 +571,7 @@ static int multiport_xlate6_v1(struct xt
81 }
82
83 static struct xtables_match multiport_mt_reg[] = {
84+#ifndef NO_LEGACY
85 {
86 .family = NFPROTO_IPV4,
87 .name = "multiport",
88@@ -601,6 +602,7 @@ static struct xtables_match multiport_mt
89 .x6_options = multiport_opts,
90 .xlate = multiport_xlate6,
91 },
92+#endif
93 {
94 .family = NFPROTO_IPV4,
95 .name = "multiport",