One Hat Cyber Team
Your IP :
216.73.216.14
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
systemtap
/
runtime
/
linux
/
View File Name :
netfilter.c
#ifndef __NETFILTER_C__ #define __NETFILTER_C__ #ifndef STAPCONF_NF_REGISTER_HOOK // The following kernel commit removed nf_register_hook(), which the // netfilter probes use: // // commit cf56c2f892a8a1870a8358114ad896772da7543a // Author: Florian Westphal <fw@strlen.de> // Date: Thu Jul 6 23:17:44 2017 +0200 // // netfilter: remove old pre-netns era hook api // // no more users in the tree, remove this. // // The old api is racy wrt. module removal, all users have been converted // to the netns-aware api. // // The old api pretended we still have global hooks but that has not been // true for a long time. // // So, we'll add our own nf_register_hook(), that pretends that global // hooks exist. #include <net/net_namespace.h> #include <linux/netfilter.h> #include <linux/errno.h> static int nf_register_hook(struct nf_hook_ops *reg) { struct net *net, *last; int ret = 0; for_each_net(net) { ret = nf_register_net_hook(net, reg); if (ret && ret != -ENOENT) goto rollback; } return 0; rollback: last = net; for_each_net(net) { if (net == last) break; nf_unregister_net_hook(net, reg); } return ret; } static void nf_unregister_hook(struct nf_hook_ops *reg) { struct net *net; for_each_net(net) { nf_unregister_net_hook(net, reg); } } #endif // STAPCONF_NF_REGISTER_HOOK #endif // __NETFILTER_C__