mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-09 22:24:58 +02:00
compat_xtables: return bool for match_check and target_check in 2.6.23..34
Reported-by: Tomasz Pala <gotar@polanet.pl>
This commit is contained in:
@@ -105,7 +105,11 @@ static bool xtnu_match_check(const char *table, const void *entry,
|
|||||||
return false;
|
return false;
|
||||||
if (nm->checkentry == NULL)
|
if (nm->checkentry == NULL)
|
||||||
return true;
|
return true;
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
|
||||||
return nm->checkentry(&local_par);
|
return nm->checkentry(&local_par);
|
||||||
|
#else
|
||||||
|
return nm->checkentry(&local_par) == 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) && \
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) && \
|
||||||
@@ -118,7 +122,7 @@ static bool xtnu_match_check(const struct xt_mtchk_param *par)
|
|||||||
return false;
|
return false;
|
||||||
if (nm->checkentry == NULL)
|
if (nm->checkentry == NULL)
|
||||||
return true;
|
return true;
|
||||||
return nm->checkentry(par) == 0 ? true : false;
|
return nm->checkentry(par) == 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -313,7 +317,11 @@ static bool xtnu_target_check(const char *table, const void *entry,
|
|||||||
if (nt->checkentry == NULL)
|
if (nt->checkentry == NULL)
|
||||||
/* this is valid, just like if there was no function */
|
/* this is valid, just like if there was no function */
|
||||||
return true;
|
return true;
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
|
||||||
return nt->checkentry(&local_par);
|
return nt->checkentry(&local_par);
|
||||||
|
#else
|
||||||
|
return nt->checkentry(&local_par) == 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -327,7 +335,7 @@ static bool xtnu_target_check(const struct xt_tgchk_param *par)
|
|||||||
return false;
|
return false;
|
||||||
if (nt->checkentry == NULL)
|
if (nt->checkentry == NULL)
|
||||||
return true;
|
return true;
|
||||||
return nt->checkentry(par) == 0 ? true : false;
|
return nt->checkentry(par) == 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user