aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/ebtables/patches/200-fix-extension-init.patch
blob: 60e2afd331c971b7cdf1fc9caad3976ee66d7305 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -11,13 +11,13 @@ EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -leb
 EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T))
 
 extensions/ebt_%.so: extensions/ebt_%.o
-	$(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
+	$(CC) $(LDFLAGS) -shared -o $@ -lc $<
 
 extensions/libebt_%.so: extensions/ebt_%.so
 	mv $< $@
 
 extensions/ebtable_%.so: extensions/ebtable_%.o
-	$(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
+	$(CC) $(LDFLAGS) -shared -o $@ -lc $<
 
 extensions/libebtable_%.so: extensions/ebtable_%.so
 	mv $< $@
--- a/extensions/ebt_802_3.c
+++ b/extensions/ebt_802_3.c
@@ -141,7 +141,7 @@ static struct ebt_u_match _802_3_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&_802_3_match);
 }
--- a/extensions/ebt_among.c
+++ b/extensions/ebt_among.c
@@ -491,7 +491,7 @@ static struct ebt_u_match among_match =
 	.extra_ops 	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&among_match);
 }
--- a/extensions/ebt_arp.c
+++ b/extensions/ebt_arp.c
@@ -362,7 +362,7 @@ static struct ebt_u_match arp_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&arp_match);
 }
--- a/extensions/ebt_arpreply.c
+++ b/extensions/ebt_arpreply.c
@@ -133,7 +133,7 @@ static struct ebt_u_target arpreply_targ
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_target(&arpreply_target);
 }
--- a/extensions/ebt_ip.c
+++ b/extensions/ebt_ip.c
@@ -472,7 +472,7 @@ static struct ebt_u_match ip_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&ip_match);
 }
--- a/extensions/ebt_ip6.c
+++ b/extensions/ebt_ip6.c
@@ -413,7 +413,7 @@ static struct ebt_u_match ip6_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&ip6_match);
 }
--- a/extensions/ebt_limit.c
+++ b/extensions/ebt_limit.c
@@ -212,7 +212,7 @@ static struct ebt_u_match limit_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&limit_match);
 }
--- a/extensions/ebt_log.c
+++ b/extensions/ebt_log.c
@@ -217,7 +217,7 @@ static struct ebt_u_watcher log_watcher
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_watcher(&log_watcher);
 }
--- a/extensions/ebt_mark.c
+++ b/extensions/ebt_mark.c
@@ -172,7 +172,7 @@ static struct ebt_u_target mark_target =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_target(&mark_target);
 }
--- a/extensions/ebt_mark_m.c
+++ b/extensions/ebt_mark_m.c
@@ -121,7 +121,7 @@ static struct ebt_u_match mark_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&mark_match);
 }
--- a/extensions/ebt_nat.c
+++ b/extensions/ebt_nat.c
@@ -231,7 +231,7 @@ static struct ebt_u_target dnat_target =
 	.extra_ops	= opts_d,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_target(&snat_target);
 	ebt_register_target(&dnat_target);
--- a/extensions/ebt_nflog.c
+++ b/extensions/ebt_nflog.c
@@ -166,7 +166,7 @@ static struct ebt_u_watcher nflog_watche
 	.extra_ops = nflog_opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_watcher(&nflog_watcher);
 }
--- a/extensions/ebt_pkttype.c
+++ b/extensions/ebt_pkttype.c
@@ -125,7 +125,7 @@ static struct ebt_u_match pkttype_match
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&pkttype_match);
 }
--- a/extensions/ebt_redirect.c
+++ b/extensions/ebt_redirect.c
@@ -108,7 +108,7 @@ static struct ebt_u_target redirect_targ
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_target(&redirect_target);
 }
--- a/extensions/ebt_standard.c
+++ b/extensions/ebt_standard.c
@@ -84,7 +84,7 @@ static struct ebt_u_target standard =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_target(&standard);
 }
--- a/extensions/ebt_stp.c
+++ b/extensions/ebt_stp.c
@@ -337,7 +337,7 @@ static struct ebt_u_match stp_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&stp_match);
 }
--- a/extensions/ebt_ulog.c
+++ b/extensions/ebt_ulog.c
@@ -180,7 +180,7 @@ static struct ebt_u_watcher ulog_watcher
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_watcher(&ulog_watcher);
 }
--- a/extensions/ebt_vlan.c
+++ b/extensions/ebt_vlan.c
@@ -181,7 +181,7 @@ static struct ebt_u_match vlan_match = {
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&vlan_match);
 }
--- a/extensions/ebtable_broute.c
+++ b/extensions/ebtable_broute.c
@@ -23,7 +23,7 @@ ebt_u_table table =
 	.help		= print_help,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_table(&table);
 }
--- a/extensions/ebtable_filter.c
+++ b/extensions/ebtable_filter.c
@@ -29,7 +29,7 @@ static struct ebt_u_table table =
 	.help		= print_help,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_table(&table);
 }
--- a/extensions/ebtable_nat.c
+++ b/extensions/ebtable_nat.c
@@ -30,7 +30,7 @@ ebt_u_table table =
 	.help		= print_help,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_table(&table);
 }
--- a/extensions/ebt_string.c
+++ b/extensions/ebt_string.c
@@ -312,7 +312,7 @@ static struct ebt_u_match string_match =
 	.extra_ops	= opts,
 };
 
-void _init(void)
+__attribute__((constructor)) static void extension_init(void)
 {
 	ebt_register_match(&string_match);
 }