diff options
Diffstat (limited to 'kernel/ipt_set.c')
-rw-r--r-- | kernel/ipt_set.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/kernel/ipt_set.c b/kernel/ipt_set.c index 114f973..2f97cbb 100644 --- a/kernel/ipt_set.c +++ b/kernel/ipt_set.c @@ -73,7 +73,7 @@ match(const struct sk_buff *skb, int offset, unsigned int protoff, int *hotdrop) -#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) static bool match(const struct sk_buff *skb, const struct net_device *in, @@ -83,9 +83,17 @@ match(const struct sk_buff *skb, int offset, unsigned int protoff, bool *hotdrop) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) */ +static bool +match(const struct sk_buff *skb, + const struct xt_match_param *par) #endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) const struct ipt_set_info_match *info = matchinfo; +#else + const struct ipt_set_info_match *info = par->matchinfo; +#endif return match_set(&info->match_set, skb, @@ -121,16 +129,23 @@ checkentry(const char *tablename, const struct xt_match *match, void *matchinfo, 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 *inf, const struct xt_match *match, void *matchinfo, unsigned int hook_mask) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) */ +static bool +checkentry(const struct xt_mtchk_param *par) #endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) struct ipt_set_info_match *info = matchinfo; +#else + struct ipt_set_info_match *info = par->matchinfo; +#endif ip_set_id_t index; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) @@ -162,12 +177,19 @@ static void destroy(void *matchinfo, static void destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize) -#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) static void destroy(const struct xt_match *match, void *matchinfo) +#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) */ +static void destroy(const struct xt_mtdtor_param *par) #endif { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) struct ipt_set_info_match *info = matchinfo; +#else + struct ipt_set_info_match *info = par->matchinfo; +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) if (matchsize != IPT_ALIGN(sizeof(struct ipt_set_info_match))) { |