ndpi-netfilter icon indicating copy to clipboard operation
ndpi-netfilter copied to clipboard

Updated to build with ndpi from ntop.org

Open lucianocoutinho opened this issue 12 years ago • 11 comments

Hi,

I try to build ndpi-netfilter last week and got a few errors, then I made these changes and now at least I can build the module. I hope this can be useful, if there is any issue on this commit, please let me know.

Thanks.

lucianocoutinho avatar Feb 18 '13 14:02 lucianocoutinho

I am struggling to build your version. I want to use the new ndpi version but when I build your code i get the LONG_STRING error, I applied the fix suggested by another user by adding the #define protocols on the correct file, but now it gives me an error every time I build and it reached the http protocol. Any clues? I am trying it on Debian 6.

SwissBureau avatar Mar 03 '13 06:03 SwissBureau

Hi @lucianocoutinho, i've succesfully built the module with some warnings related to the ahocorasick library. But when i try to depmod that module it gaves me this error:

FATAL: Error inserting xt_ndpi (/lib/modules/2.6.32-5-amd64/extra/xt_ndpi.ko): Unknown symbol in module, or unknown parameter (see dmesg)

and dmesg:

xt_ndpi: Unknown symbol ac_automata_init xt_ndpi: Unknown symbol ac_automata_search xt_ndpi: Unknown symbol ac_automata_reset xt_ndpi: Unknown symbol ac_automata_finalize xt_ndpi: Unknown symbol ac_automata_add xt_ndpi: Unknown symbol ac_automata_release

have you any idea how to fix this?

Thank you in advance

ghost avatar Apr 03 '13 11:04 ghost

Try this (works for me) vim src/Makefile

... ${NDPI_SRC}/lib/ahocorasick.o
${NDPI_SRC}/lib/node.o
${NDPI_SRC}/lib/sort.o
...

all: if test -d ${NDPI_SRC}; then
cp ${NDPI_PATH2}/* ${NDPI_SRC} -R;
else
mkdir ${NDPI_SRC};
cp ${NDPI_PATH2}/* ${NDPI_SRC} -R;
fi cp ${NDPI_SRC}/lib/third_party/src/.c ${NDPI_SRC}/lib -R; cp ${NDPI_SRC}/lib/third_party/include/.h ${NDPI_SRC}/lib -R; cp ${NDPI_SRC}/lib/third_party/include/*.h ${NDPI_SRC}/include -R; make -C ${KERNEL_DIR} M=$$PWD; rm -r ${NDPI_SRC}

betolj avatar Apr 22 '13 03:04 betolj

This is the changes that i do: http://www54.zippyshare.com/v/9554405/file.html

Works in Ubuntu 12.04, kernel 3.2.0-39-generic and with lastest nDPI version.

betolj avatar Apr 22 '13 23:04 betolj

Hello,

here is my patch ndpi-netfilter from ewildgoose for latest nDPI libs and fix for kernel 3.4.x. http://www57.zippyshare.com/v/91243236/file.html

Working on Centos 6.4, kernel 3.2.50 with latest nDPI version 1.4 revision 7544

michaldvoracek avatar Sep 01 '13 23:09 michaldvoracek

Hello,

any idea how can I compile the ndpi-netfilter? I'm receiving the same error as SwissBureau, related with LONG_STRING and SHORT_STRING. I'm trying to build on debian 7, kernel 3.2, latest ndpi from ntop and the current master version. Returns the following:

libxt_ndpi.c:33:34: error: ‘NDPI_PROTOCOL_LONG_STRING’ undeclared here (not in a function) libxt_ndpi.c:34:35: error: ‘NDPI_PROTOCOL_SHORT_STRING’ undeclared here (not in a function) libxt_ndpi.c:34:1: error: initializer element is not constant libxt_ndpi.c:34:1: error: (near initialization for ‘prot_short_str[0]’) libxt_ndpi.c: In function ‘ndpi_mt_init’: libxt_ndpi.c:116:25: warning: unused variable ‘info’ [-Wunused-variable] make[2]: *** [libxt_ndpi.o] Error 1

What can I do? Thank you!

aklik avatar Apr 14 '14 12:04 aklik

I managed to pass that error, stumble in various protocols missing , seem to me that this ndpi-filter doesn't work with last version of ndpi. Can you please tell me with which svn version should work ? thanks!

aklik avatar Apr 15 '14 09:04 aklik

I'm also not getting past this error. I've tried the other netfilter patches listed incomments but they don't build for me either.

Does anyone know the most recent version of nDPI that this builds against?

syadnom avatar Nov 13 '14 15:11 syadnom

Try with this fork: https://github.com/betolj/ndpi-netfilter

2014-11-13 12:19 GMT-03:00 syadnom [email protected]:

I'm also not getting past this error. I've tried the other netfilter patches listed incomments but they don't build for me either.

Does anyone know the most recent version of nDPI that this builds against?

— Reply to this email directly or view it on GitHub https://github.com/ewildgoose/ndpi-netfilter/pull/1#issuecomment-62905287 .

betolj avatar Nov 13 '14 15:11 betolj

thanks betolj, I did find that I can get it to build, but it's not actually matching anything :/

syadnom avatar Nov 13 '14 18:11 syadnom

Hi, Unfortunately this module is incompatible with nf_conntrack_netlink.

And, unless you recompile the kernel with the patch, the module nf_conntrack_netlink can not be loaded into memory (but you will have problems with conntrack tool).

rmmod nf_conntrack_netlink modprobe xt_ndpi

2014-11-13 15:15 GMT-03:00 syadnom [email protected]:

thanks betolj, I did find that I can get it to build, but it's not actually matching anything :/

— Reply to this email directly or view it on GitHub https://github.com/ewildgoose/ndpi-netfilter/pull/1#issuecomment-62939139 .

betolj avatar Nov 13 '14 18:11 betolj