@@ -75,7 +75,13 @@ static int fault_handler(struct kprobe *p, struct pt_regs *regs, int trapnr)
7575 return 0 ;
7676}
7777
78- static unsigned int nf_hook_v4_in (unsigned int hook , struct sk_buff * skb ,
78+ #if LINUX_VERSION_CODE >= KERNEL_VERSION (3 ,13 ,0 )
79+ typedef const struct nf_hook_ops * nf_hook_type ;
80+ #else
81+ typedef unsigned int nf_hook_type ;
82+ #endif
83+
84+ static unsigned int nf_hook_v4_in (nf_hook_type hook , struct sk_buff * skb ,
7985 const struct net_device * indev , const struct net_device * outdev ,
8086 int (* okfn )(struct sk_buff * ))
8187{
@@ -88,7 +94,7 @@ static unsigned int nf_hook_v4_in(unsigned int hook, struct sk_buff *skb,
8894}
8995
9096#if defined(CONFIG_IPV6 ) || defined(CONFIG_IPV6_MODULE )
91- static unsigned int nf_hook_v6_in (unsigned int hook , struct sk_buff * skb ,
97+ static unsigned int nf_hook_v6_in (nf_hook_type hook , struct sk_buff * skb ,
9298 const struct net_device * indev , const struct net_device * outdev ,
9399 int (* okfn )(struct sk_buff * ))
94100{
@@ -101,7 +107,7 @@ static unsigned int nf_hook_v6_in(unsigned int hook, struct sk_buff *skb,
101107}
102108#endif
103109
104- static unsigned int nf_hook_out (unsigned int hook , struct sk_buff * skb ,
110+ static unsigned int nf_hook_out (nf_hook_type hook , struct sk_buff * skb ,
105111 const struct net_device * indev ,
106112 const struct net_device * outdev ,
107113 int (* okfn )(struct sk_buff * ))
0 commit comments