Hi James,
The latest version of iptables with mpls is impossible to compile or when I
changed the code to compile it, "-j mpls" doesn't work anymore.
The first problem is well-known from the iptables community because it's an
incompatibility between the header of kernel 2.6.19.
cc -O2 -Wall -Wunused -I/usr/src/kernel-mpls//include -Iinclude/
-DIPTABLES_VERSION=\"1.3.5\" -fPIC -o extensions/libipt_iprange_sh.o -c
extensions/libipt_iprange.c
In file included from extensions/libipt_iprange.c:9:
/usr/src/kernel-mpls//include/linux/netfilter_ipv4/ipt_iprange.h:11: error:
expected specifier-qualifier-list before '__be32'
extensions/libipt_iprange.c: In function 'parse_iprange':
extensions/libipt_iprange.c:43: error: 'struct ipt_iprange' has no member
named 'min_ip'
extensions/libipt_iprange.c:50: error: 'struct ipt_iprange' has no member
named 'max_ip'
extensions/libipt_iprange.c:52: error: 'struct ipt_iprange' has no member
named 'max_ip'
extensions/libipt_iprange.c:52: error: 'struct ipt_iprange' has no member
named 'min_ip'
extensions/libipt_iprange.c: In function 'print_iprange':
extensions/libipt_iprange.c:117: error: 'const struct ipt_iprange' has no
member named 'min_ip'
extensions/libipt_iprange.c:118: error: 'const struct ipt_iprange' has no
member named 'max_ip'
make: *** [extensions/libipt_iprange_sh.o] Error 1
The previous error can be fixed : see
here<http://lists.netfilter.org/pipermail/netfilter/2006-October/066947.html>
The second error is more difficult to solve:
I tried to compile it on two different computers and the error is the same :
1)
cc -O2 -Wall -Wunused -I/usr/src/kernel-mpls//include -Iinclude/
-DIPTABLES_VERSION=\"1.3.5\" -fPIC -o extensions/libipt_mpls_sh.o -c
extensions/libipt_mpls.c
cc -shared -o extensions/libipt_mpls.so extensions/libipt_mpls_sh.o
extensions/libipt_mpls_sh.o: In function `_init':
libipt_mpls.c:(.text+0x10): multiple definition of `_init'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../crti.o:/var/tmp/portage/glibc-
2.3.6-r5/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S:12:
first defined here
collect2: ld returned 1 exit status
make: *** [extensions/libipt_mpls.so] Error 1
2)
cc -O2 -Wall -Wunused -I/sys/usr/src/kernel-mpls//include -Iinclude/
-DIPTABLES_VERSION=\"1.3.5\" -fPIC -o extensions/libipt_mpls_sh.o -c
extensions/libipt_mpls.c
cc -shared -o extensions/libipt_mpls.so extensions/libipt_mpls_sh.o
extensions/libipt_mpls_sh.o: In function `_init':
libipt_mpls.c:(.text+0x10): multiple definition of `_init'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o:/build/buildd/glibc-
2.3.6.ds1/build-tree/i386-libc/csu/crti.S:36: first defined here
The problem comes from the declaration of the _init function! If I change
the function _init to my_init the argument "-j mpls" doesn't work anymore.
Could you please tell me how to fix this issue please?
Thank you in advance,
Julien
--
--------------------------------------------
Julien BISCONTI <julien.bisconti(at)student.fundp.ac.be>
M.Sc. student in Computer Science, University of Namur
FUNDP, Belgium
|