]> git.pld-linux.org Git - packages/xtables-addons.git/blob - xtables-addons-pre2.6.35-checkentry.patch
- unbroken on pre2.6.23 kernels (upstream fix: http://xtables-addons.git.sf.net/git...
[packages/xtables-addons.git] / xtables-addons-pre2.6.35-checkentry.patch
1 diff --git a/extensions/compat_xtables.c b/extensions/compat_xtables.c
2 index 8514af8..9e96c0d 100644
3 --- a/extensions/compat_xtables.c
4 +++ b/extensions/compat_xtables.c
5 @@ -105,7 +105,11 @@ static bool xtnu_match_check(const char *table, const void *entry,
6                 return false;
7         if (nm->checkentry == NULL)
8                 return true;
9 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
10         return nm->checkentry(&local_par);
11 +#else
12 +       return nm->checkentry(&local_par) == 0;
13 +#endif
14  }
15  #endif
16  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) && \
17 @@ -118,7 +122,7 @@ static bool xtnu_match_check(const struct xt_mtchk_param *par)
18                 return false;
19         if (nm->checkentry == NULL)
20                 return true;
21 -       return nm->checkentry(par) == 0 ? true : false;
22 +       return nm->checkentry(par) == 0;
23  }
24  #endif
25  
26 @@ -313,7 +317,11 @@ static bool xtnu_target_check(const char *table, const void *entry,
27         if (nt->checkentry == NULL)
28                 /* this is valid, just like if there was no function */
29                 return true;
30 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
31         return nt->checkentry(&local_par);
32 +#else
33 +       return nt->checkentry(&local_par) == 0;
34 +#endif
35  }
36  #endif
37  
38 @@ -327,7 +335,7 @@ static bool xtnu_target_check(const struct xt_tgchk_param *par)
39                 return false;
40         if (nt->checkentry == NULL)
41                 return true;
42 -       return nt->checkentry(par) == 0 ? true : false;
43 +       return nt->checkentry(par) == 0;
44  }
45  #endif
46  
This page took 0.041347 seconds and 3 git commands to generate.