From a1b4aa27c0efcc8d8c6d582d7eed1e014b424088 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sat, 17 Jan 2009 00:25:24 +0100 Subject: 2.4.6 Compatibility fix for kernels >= 2.6.28 --- kernel/ipt_SET.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'kernel/ipt_SET.c') diff --git a/kernel/ipt_SET.c b/kernel/ipt_SET.c index a6cad1d..cd89beb 100644 --- a/kernel/ipt_SET.c +++ b/kernel/ipt_SET.c @@ -57,16 +57,23 @@ target(struct sk_buff **pskb, unsigned int hooknum, const struct xt_target *target, const void *targinfo) -#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) target(struct sk_buff *skb, const struct net_device *in, const struct net_device *out, unsigned int hooknum, const struct xt_target *target, const void *targinfo) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) */ +target(struct sk_buff *skb, + const struct xt_target_param *par) #endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) const struct ipt_set_info_target *info = targinfo; +#else + const struct ipt_set_info_target *info = par->targinfo; +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) struct sk_buff *skb = *pskb; #endif @@ -113,16 +120,23 @@ checkentry(const char *tablename, const struct xt_target *target, void *targinfo, unsigned int hook_mask) -#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) static bool checkentry(const char *tablename, const void *e, const struct xt_target *target, void *targinfo, unsigned int hook_mask) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) */ +static bool +checkentry(const struct xt_tgchk_param *par) #endif { - struct ipt_set_info_target *info = targinfo; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) + const struct ipt_set_info_target *info = targinfo; +#else + const struct ipt_set_info_target *info = par->targinfo; +#endif ip_set_id_t index; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) @@ -165,12 +179,18 @@ static void destroy(void *targetinfo, static void destroy(const struct xt_target *target, void *targetinfo, unsigned int targetsize) -#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) static void destroy(const struct xt_target *target, void *targetinfo) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) */ +static void destroy(const struct xt_tgdtor_param *par) #endif { - struct ipt_set_info_target *info = targetinfo; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) + const struct ipt_set_info_target *info = targinfo; +#else + const struct ipt_set_info_target *info = par->targinfo; +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) if (targetsize != IPT_ALIGN(sizeof(struct ipt_set_info_target))) { -- cgit v1.2.3