Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown Symbol when trying to insert the module #78

Open
fredohdz opened this issue Nov 20, 2019 · 1 comment
Open

Unknown Symbol when trying to insert the module #78

fredohdz opened this issue Nov 20, 2019 · 1 comment

Comments

@fredohdz
Copy link

fredohdz commented Nov 20, 2019

Compile went fine but having this error when trying to insert the module

[ 7990.784267] xt_ndpi: Unknown symbol nf_ct_l3proto_module_put (err -2)
[ 7990.784406] xt_ndpi: Unknown symbol nf_ct_l3proto_try_module_get (err -2)

Debian 10 Kernel version Debian 4.19.67-2+deb10u2 , has anyone else having this issue ? or know how to solve?

@rightkick
Copy link

rightkick commented Mar 19, 2021

I faced the same issue with Debian buster kernel 4.19.0-13-amd64. I did the following to resolve this. I'm putting all the steps for your convenience:

cd /usr/local/src/
git clone https://github.com/betolj/ndpi-netfilter.git
cd /usr/local/src/ndpi-netfilter
tar xvfz nDPI.tar.gz

# find all the references of the missing kernel symbol
grep -r nf_ct_l3proto .

# output
./src/main.c:   return nf_ct_l3proto_try_module_get (match->family) == 0;
./src/main.c:   return nf_ct_l3proto_try_module_get (par->family) == 0;
./src/main.c:   return nf_ct_l3proto_try_module_get (par->family);
./src/main.c:   nf_ct_l3proto_module_put (match->family);
./src/main.c:   nf_ct_l3proto_module_put (par->family);
./old/src/main.c:       return nf_ct_l3proto_try_module_get (match->family) == 0;
./old/src/main.c:       return nf_ct_l3proto_try_module_get (par->family) == 0;
./old/src/main.c:       return nf_ct_l3proto_try_module_get (par->family);
./old/src/main.c:       nf_ct_l3proto_module_put (match->family);
./old/src/main.c:       nf_ct_l3proto_module_put (par->family);

# and edit at each above occurence the return command to return false. example: 
return nf_ct_l3proto_try_module_get (match->family) == 0;
---> 
return false;

and comment out all the other. example: 
//nf_ct_l3proto_module_put (match->family);

# Proceed with the normal installation steps: 
cd nDPI
./autogen.sh
make
make install
cd ..
NDPI_PATH=/usr/local/src/ndpi-netfilter/nDPI make
make modules_install
cp /usr/local/src/ndpi-netfilter/ipt/libxt_ndpi.so /usr/lib/x86_64-linux-gnu/xtables/

# manually load the module just for testing
modprobe xt_ndpi

# Confirm good order
lsmod | grep ndpi
iptables -m ndpi --help

Note that I believe that the above changes are safe as they are included in if statements for older kernel versions. I cannot say though that I understand the code. Following this patch, I did not see any issue with a quick test.

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

No branches or pull requests

2 participants