fix build issue for kernel 3.14

This commit is contained in:
2020-12-08 17:42:26 +08:00
parent 75fdf912a5
commit f349fc5ee4
2 changed files with 5 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ define KernelPackage/xmurp-ua
SUBMENU:=Other modules
TITLE:=xmurp-ua
FILES:=$(PKG_BUILD_DIR)/xmurp-ua.ko
# AUTOLOAD:=$(call AutoLoad, 99, rkp-ua)
# AUTOLOAD:=$(call AutoLoad, 99, xmurp-ua)
KCONFIG:=
endef

View File

@@ -3,7 +3,11 @@
static struct nf_hook_ops nfho[3]; // 需要在 INPUT、OUTPUT、FORWARD 各挂一个
static struct rkpManager* rkpm;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
unsigned int hook_funcion(void *priv, struct sk_buff *skb, const struct nf_hook_state *state)
#else
unsigned int hook_funcion(const struct nf_hook_ops *ops, struct sk_buff *skb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *))
#endif
{
unsigned rtn;