Skip to content

Conversation

lucianocoutinho
Copy link

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.

@SwissBureau
Copy link

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.

@ghost
Copy link

ghost commented Apr 3, 2013

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

@betolj
Copy link

betolj commented Apr 22, 2013

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
Copy link

betolj commented Apr 22, 2013

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.

@michaldvoracek
Copy link

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

@aklik
Copy link

aklik commented Apr 14, 2014

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
Copy link

aklik commented Apr 15, 2014

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!

@syadnom
Copy link

syadnom commented Nov 13, 2014

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?

@betolj
Copy link

betolj commented Nov 13, 2014

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
#1 (comment)
.

@syadnom
Copy link

syadnom commented Nov 13, 2014

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

@betolj
Copy link

betolj commented Nov 13, 2014

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
#1 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants