iptables: reduce binary size
[openwrt/staging/lynxis/omap.git] / package / network / utils / iptables / patches / 700-disable-legacy-revisions.patch
1 Index: iptables-1.4.21/extensions/libxt_conntrack.c
2 ===================================================================
3 --- iptables-1.4.21.orig/extensions/libxt_conntrack.c
4 +++ iptables-1.4.21/extensions/libxt_conntrack.c
5 @@ -1157,6 +1157,7 @@ static void state_save(const void *ip, c
6 }
7
8 static struct xtables_match conntrack_mt_reg[] = {
9 +#ifndef NO_LEGACY
10 {
11 .version = XTABLES_VERSION,
12 .name = "conntrack",
13 @@ -1232,6 +1233,7 @@ static struct xtables_match conntrack_mt
14 .alias = conntrack_print_name_alias,
15 .x6_options = conntrack2_mt_opts,
16 },
17 +#endif
18 {
19 .version = XTABLES_VERSION,
20 .name = "conntrack",
21 @@ -1262,6 +1264,7 @@ static struct xtables_match conntrack_mt
22 .alias = conntrack_print_name_alias,
23 .x6_options = conntrack3_mt_opts,
24 },
25 +#ifndef NO_LEGACY
26 {
27 .family = NFPROTO_UNSPEC,
28 .name = "state",
29 @@ -1292,6 +1295,7 @@ static struct xtables_match conntrack_mt
30 .x6_parse = state_ct23_parse,
31 .x6_options = state_opts,
32 },
33 +#endif
34 {
35 .family = NFPROTO_UNSPEC,
36 .name = "state",
37 @@ -1307,6 +1311,7 @@ static struct xtables_match conntrack_mt
38 .x6_parse = state_ct23_parse,
39 .x6_options = state_opts,
40 },
41 +#ifndef NO_LEGACY
42 {
43 .family = NFPROTO_UNSPEC,
44 .name = "state",
45 @@ -1320,6 +1325,7 @@ static struct xtables_match conntrack_mt
46 .x6_parse = state_parse,
47 .x6_options = state_opts,
48 },
49 +#endif
50 };
51
52 void _init(void)
53 Index: iptables-1.4.21/extensions/libxt_CT.c
54 ===================================================================
55 --- iptables-1.4.21.orig/extensions/libxt_CT.c
56 +++ iptables-1.4.21/extensions/libxt_CT.c
57 @@ -290,6 +290,7 @@ static void notrack_ct2_tg_init(struct x
58 }
59
60 static struct xtables_target ct_target_reg[] = {
61 +#ifndef NO_LEGACY
62 {
63 .family = NFPROTO_UNSPEC,
64 .name = "CT",
65 @@ -315,6 +316,7 @@ static struct xtables_target ct_target_r
66 .x6_parse = ct_parse_v1,
67 .x6_options = ct_opts_v1,
68 },
69 +#endif
70 {
71 .family = NFPROTO_UNSPEC,
72 .name = "CT",
73 @@ -329,6 +331,7 @@ static struct xtables_target ct_target_r
74 .x6_parse = ct_parse_v1,
75 .x6_options = ct_opts_v1,
76 },
77 +#ifndef NO_LEGACY
78 {
79 .family = NFPROTO_UNSPEC,
80 .name = "NOTRACK",
81 @@ -366,6 +369,7 @@ static struct xtables_target ct_target_r
82 .revision = 0,
83 .version = XTABLES_VERSION,
84 },
85 +#endif
86 };
87
88 void _init(void)
89 Index: iptables-1.4.21/extensions/libxt_multiport.c
90 ===================================================================
91 --- iptables-1.4.21.orig/extensions/libxt_multiport.c
92 +++ iptables-1.4.21/extensions/libxt_multiport.c
93 @@ -469,6 +469,7 @@ static void multiport_save6_v1(const voi
94 }
95
96 static struct xtables_match multiport_mt_reg[] = {
97 +#ifndef NO_LEGACY
98 {
99 .family = NFPROTO_IPV4,
100 .name = "multiport",
101 @@ -497,6 +498,7 @@ static struct xtables_match multiport_mt
102 .save = multiport_save6,
103 .x6_options = multiport_opts,
104 },
105 +#endif
106 {
107 .family = NFPROTO_IPV4,
108 .name = "multiport",