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
|
Changed the Makefile hacking to initialize things (taken from iptables)
to using __attribute__ ((constructor)). Makes things cleaner.
--- ebtables-v2.0pre1/Makefile Wed Apr 3 18:24:15 2002
+++ ebtables-v2.0pre2/Makefile Sat Apr 6 21:53:00 2002
@@ -26,7 +26,7 @@
$(CC) $(CFLAGS) -DPROGVERSION=\"$(PROGVERSION)\" \
-DPROGNAME=\"$(PROGNAME)\" -c -o $@ $<
-ebtables: ebtables.o communication.o initext.o $(EXT_OBJS)
+ebtables: ebtables.o communication.o $(EXT_OBJS)
$(CC) $(CFLAGS) -o $@ $^
$(MANDIR)/man8/ebtables.8: ebtables.8
--- ebtables-v2.0pre1/ebtables.c Wed Apr 3 20:06:18 2002
+++ ebtables-v2.0pre2/ebtables.c Sat Apr 6 21:57:05 2002
@@ -1051,7 +1051,6 @@
replace.selected_hook = -1;
replace.command = 'h';
// execute the _init functions of the extensions
- init_extensions();
new_entry = (struct ebt_u_entry *)malloc(sizeof(struct ebt_u_entry));
if (!new_entry)
--- ebtables-v2.0pre1/extensions/ebt_nat.c Wed Apr 3 12:27:59 2002
+++ ebtables-v2.0pre2/extensions/ebt_nat.c Sat Apr 6 21:59:43 2002
@@ -160,7 +160,8 @@
opts_d,
};
-void _init(void)
+static void _init(void) __attribute__ ((constructor));
+static void _init(void)
{
register_target(&snat_target);
register_target(&dnat_target);
--- ebtables-v2.0pre1/extensions/ebt_ip.c Wed Apr 3 12:28:44 2002
+++ ebtables-v2.0pre2/extensions/ebt_ip.c Sat Apr 6 21:58:23 2002
@@ -301,7 +301,8 @@
opts,
};
-void _init(void)
+static void _init(void) __attribute((constructor));
+static void _init(void)
{
register_match(&ip_match);
}
--- ebtables-v2.0pre1/extensions/ebt_arp.c Wed Apr 3 12:29:17 2002
+++ ebtables-v2.0pre2/extensions/ebt_arp.c Sat Apr 6 21:58:05 2002
@@ -271,7 +271,8 @@
opts,
};
-void _init(void)
+static void _init(void) __attribute__ ((constructor));
+static void _init(void)
{
register_match(&arp_match);
}
--- ebtables-v2.0pre1/extensions/ebt_log.c Wed Apr 3 16:23:56 2002
+++ ebtables-v2.0pre2/extensions/ebt_log.c Sat Apr 6 21:59:34 2002
@@ -182,7 +182,9 @@
opts,
};
-void _init(void)
+#undef _init
+static void _init(void) __attribute__ ((constructor));
+static void _init(void)
{
register_watcher(&log_watcher);
}
--- ebtables-v2.0pre1/extensions/ebt_standard.c Mon Apr 1 12:49:59 2002
+++ ebtables-v2.0pre2/extensions/ebt_standard.c Sat Apr 6 22:01:29 2002
@@ -59,7 +59,8 @@
opts
};
-void _init(void)
+static void _init(void) __attribute__ ((constructor));
+static void _init(void)
{
register_target(&standard);
}
--- ebtables-v2.0pre1/extensions/ebtable_filter.c Mon Apr 1 21:25:57 2002
+++ ebtables-v2.0pre2/extensions/ebtable_filter.c Sat Apr 6 22:00:02 2002
@@ -24,7 +24,8 @@
NULL
};
-void _init(void)
+static void _init(void) __attribute__ ((constructor));
+static void _init(void)
{
register_table(&table);
}
--- ebtables-v2.0pre1/extensions/ebtable_nat.c Wed Apr 3 10:16:46 2002
+++ ebtables-v2.0pre2/extensions/ebtable_nat.c Sat Apr 6 21:59:53 2002
@@ -24,7 +24,8 @@
NULL
};
-void _init(void)
+static void _init(void) __attribute__ ((constructor));
+static void _init(void)
{
register_table(&table);
}
--- ebtables-v2.0pre1/include/ebtables_u.h Wed Apr 3 17:20:17 2002
+++ ebtables-v2.0pre2/include/ebtables_u.h Sat Apr 6 21:56:16 2002
@@ -25,9 +25,6 @@
#define EBTABLES_U_H
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/br_db.h>
-#ifdef _INIT
-#define _init _INIT
-#endif
struct ebt_u_entries
{
|