compat_xtables: move to 2.6.35 API for matches

This commit is contained in:
Jan Engelhardt
2010-03-27 23:22:58 +01:00
parent 02d8bdc3d9
commit beb3358297
9 changed files with 62 additions and 40 deletions

View File

@@ -85,6 +85,20 @@ static bool xtnu_match_check(const char *table, const void *entry,
}
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) && \
LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
static bool xtnu_match_check(const struct xt_mtchk_param *par)
{
struct xtnu_match *nm = xtcompat_numatch(cm);
if (nm == NULL)
return false;
if (nm->checkentry == NULL)
return true;
return nm->checkentry(par);
}
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18)
static void xtnu_match_destroy(const struct xt_match *cm, void *matchinfo,
unsigned int matchinfosize)
@@ -105,7 +119,7 @@ static void xtnu_match_destroy(const struct xt_match *cm, void *matchinfo)
}
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 27)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
int xtnu_register_match(struct xtnu_match *nt)
{
struct xt_match *ct;