ipp2p v0.8.2 fix for iptables 1.3.6/1.3.7 on linux 2.6.18/2.6.19
PATCH 1/1 ipp2p v0.8.2 fix for iptables 1.3.6/1.3.7 on linux 2.6.18/2.6.19
Hi,
I'm not sure when this bug started acting up. I'm currently running IPP2P v0.8.2 on linux 2.6.19 with iptables 1.3.7. The standard release will compile but not work correctly. The kernel module loads without problems, but the userspace library (libipt_ipp2p.so) won't load.
The problem is that when the module is loaded, the _init() function should be called by dlopen(). This doesn't happen because dlopen() can't find the constructor (_init())
The iptables includes redefine every _init() function to be my_init(), and mark it as a constructor with __attribute__((constructor)). This attribute is only recognized by the compiler it seems, not the linker. And because the ipp2p module is compiled and then linked with "ld" instead of "gcc", the constructor never gets recognized, thereby causing the world of pain I've been in the last week.
So, to make a long story short(er): patch the ipp2p source with the attached patch to get it working.
kind regards,
-- Steven
Signature · 2 lines
My amazon wishlist: http://www.amazon.com/gp/registry/1DB4XNEIEQBPB
Makefile +1 -1
@@ -60,7 +60,7 @@ libipt_ipp2p.so: libipt_ipp2p.c ipt_ipp2p.h $(CC) $(CFLAGS) $(IPTABLES_OPTION) $(IPTABLES_INCLUDE) -fPIC -c libipt_ipp2p.c - ld -shared -o libipt_ipp2p.so libipt_ipp2p.o + $(CC) -shared -o libipt_ipp2p.so libipt_ipp2p.o clean: -rm -f *.o *.so *.ko .*.cmd *.mod.c