diff --git a/Makefile b/Makefile index c201414..11b8aba 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/xmurp-ua.c b/src/xmurp-ua.c index dd03b9f..5e8241e 100644 --- a/src/xmurp-ua.c +++ b/src/xmurp-ua.c @@ -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;