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

centos8 stream,insmod xt_FULLCONENAT.ko后报错,有大佬看看是什么情况吗 #45

Open
948761819 opened this issue Sep 18, 2024 · 0 comments

Comments

@948761819
Copy link

make[1]: Nothing to be done for 'static'.
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [Makefile:63: bin/natmap] Error 1
[root@ natmap]# statically link
-bash: statically: command not found
[root@ natmap]# make CROSS_PREFIX=${cross-toolchain}/bin/x86_64-unknown-linux-
make[1]: Nothing to be done for 'static'.
make: toolchain/bin/x86_64-unknown-linux-gcc: Command not found
make: *** [Makefile:63: bin/natmap] Error 127
[root@ natmap]# cd /root/netfilter-full-cone-nat
[root@ netfilter-full-cone-nat]# make
make -C /lib/modules/6.10.10-1.el8.elrepo.x86_64/build M=/root/netfilter-full-cone-nat modules
make[1]: Entering directory '/usr/src/kernels/6.10.10-1.el8.elrepo.x86_64'
CC [M] /root/netfilter-full-cone-nat/xt_FULLCONENAT.o
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c: In function ‘find_appropriate_port’:
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c:427:24: error: implicit declaration of function ‘prandom_u32’; did you mean ‘get_random_u32’? [-Werror=implicit-function-declaration]
start = (uint16_t)(prandom_u32() % (u32)range_size);
^~~~~~~~~~~
get_random_u32
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c: In function ‘fullconenat_tg_check’:
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c:648:22: error: ‘struct nf_ct_event_notifier’ has no member named ‘fcn’
ct_event_notifier.fcn = ct_event_cb;
^
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c:651:9: error: void value not ignored as it ought to be
if (nf_conntrack_register_notifier(par->net, &ct_event_notifier) == 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c: In function ‘fullconenat_tg_destroy’:
/root/netfilter-full-cone-nat/xt_FULLCONENAT.c:675:7: error: too many arguments to function ‘nf_conntrack_unregister_notifier’
nf_conntrack_unregister_notifier(par->net, &ct_event_notifier);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/net/netfilter/nf_conntrack_core.h:18,
from /root/netfilter-full-cone-nat/xt_FULLCONENAT.c:28:
./include/net/netfilter/nf_conntrack_ecache.h:70:6: note: declared here
void nf_conntrack_unregister_notifier(struct net *net);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:244: /root/netfilter-full-cone-nat/xt_FULLCONENAT.o] Error 1
make[2]: *** [/usr/src/kernels/6.10.10-1.el8.elrepo.x86_64/Makefile:1934: /root/netfilter-full-cone-nat] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.10.10-1.el8.elrepo.x86_64'
make: *** [Makefile:5: all] Error 2

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

1 participant