diff --git a/doc/api/2.6.17.c b/doc/api/2.6.17.c index 3b56e47..08a431d 100644 --- a/doc/api/2.6.17.c +++ b/doc/api/2.6.17.c @@ -13,7 +13,7 @@ match: int *hotdrop, ); - /* error code */ + /* true/false */ int (*checkentry)( const char *tablename, @@ -45,7 +45,7 @@ target: void *userdata, ); - /* error code */ + /* true/false */ int (*checkentry)( const char *tablename, diff --git a/doc/api/2.6.19.c b/doc/api/2.6.19.c index 9bc658f..5fd48da 100644 --- a/doc/api/2.6.19.c +++ b/doc/api/2.6.19.c @@ -13,7 +13,7 @@ match: int *hotdrop, ); - /* error code */ + /* true/false */ int (*checkentry)( const char *tablename, @@ -42,7 +42,7 @@ target: const void *targinfo, ); - /* error code */ + /* true/false */ int (*checkentry)( const char *tablename, diff --git a/doc/changelog.txt b/doc/changelog.txt index 2ece6be..48d5436 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,6 +1,9 @@ HEAD ==== +Fixes: +- compat_xtables: fixed mistranslation of checkentry return values + (affected kernels < 2.6.23) v1.41 (2012-01-04) diff --git a/extensions/compat_xtables.c b/extensions/compat_xtables.c index c5b67a4..26f6a00 100644 --- a/extensions/compat_xtables.c +++ b/extensions/compat_xtables.c @@ -110,11 +110,7 @@ static bool xtnu_match_check(const char *table, const void *entry, return false; if (nm->checkentry == NULL) return true; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) - return nm->checkentry(&local_par); -#else return nm->checkentry(&local_par) == 0; -#endif } #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) && \ @@ -322,11 +318,7 @@ static bool xtnu_target_check(const char *table, const void *entry, if (nt->checkentry == NULL) /* this is valid, just like if there was no function */ return true; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) - return nt->checkentry(&local_par); -#else return nt->checkentry(&local_par) == 0; -#endif } #endif