Trying to compile module (1.5.1 and 1.6):
Compiling for kernel 2.6.27.23-78.2.50.ipset.fc9.i686.PAE
make -C /lib/modules/2.6.27.23-78.2.50.ipset.fc9.i686.PAE/build M=/home/vitek/ipt_netflow-1.6 modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.23-78.2.50.ipset.fc9.i686.PAE'
CC [M] /home/vitek/ipt_netflow-1.6/ipt_NETFLOW.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/vitek/ipt_netflow-1.6/ipt_NETFLOW.mod.o
LD [M] /home/vitek/ipt_netflow-1.6/ipt_NETFLOW.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.27.23-78.2.50.ipset.fc9.i686.PAE'
gcc -O2 -Wall -Wunused -I/lib/modules/2.6.27.23-78.2.50.ipset.fc9.i686.PAE/build/include -I/usr/src/iptables-1.4.1.1/include -DIPTABLES_VERSION=\"1.4.1.1\" -fPIC -o libipt_NETFLOW_sh.o -c libipt_NETFLOW.c
gcc -shared -o libipt_NETFLOW.so libipt_NETFLOW_sh.o
libipt_NETFLOW_sh.o: In function `_init':
libipt_NETFLOW.c:(.text+0x30): multiple definition of `_init'
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crti.o:(.init+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [libipt_NETFLOW.so] Error 1
Everything worked fine with previous version of iptables (1.4.0)
Solved the problem with -nosdtlib
Counters for rule -j NETFLOW are growing up.
But i'm unsure that is the best practice.
To me 1.6 compiles smoothly with 1.4.1.1 iptables. (First I compile and install iptables, and run ./configure of my module.)
I see example of compilation with 1.4.1.1 (with `make V=1'):
gcc -Wp,-MMD,./.libipt_DNAT.oo.d,-MT,libipt_DNAT.oo -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -DXTABLES_LIBDIR=\"/usr/local/libexec/xtables\" -DXTABLES_INTERNAL -I../include -I../include -D_INIT=libipt_DNAT_init -DPIC -fPIC -g -O2 -o libipt_DNAT.oo -c libipt_DNAT.c;
gcc -shared -o libipt_DNAT.so libipt_DNAT.oo;
So you could try to add -D_INIT=libipt_NETFLOW_init
ps. Oh authors ot iptables surely like to mess things, can't catch them to fit module for all versions and subversions.