]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
compat_xtables: fixed mistranslation of checkentry return values
authorJan Engelhardt <jengelh@medozas.de>
Thu, 12 Jan 2012 08:21:39 +0000 (09:21 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 12 Jan 2012 08:21:39 +0000 (09:21 +0100)
doc/api/2.6.17.c
doc/api/2.6.19.c
doc/changelog.txt
extensions/compat_xtables.c

index 3b56e47a0a80fbcb201df092aae7c3e89bbe31ae..08a431df4a9f68d541141b55a9659b6356f0de03 100644 (file)
@@ -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,
index 9bc658f39ae6b5f9b2d38bd2f57e645e6c07e22d..5fd48daf8bcab73ff3eb2cd1e99175f86cef1f2c 100644 (file)
@@ -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,
index 2ece6bec2e2983b76d3a34d04d871d7a96d26d9f..48d5436df34aec9bc35c07c9de322b35d71527f7 100644 (file)
@@ -1,6 +1,9 @@
 
 HEAD
 ====
+Fixes:
+- compat_xtables: fixed mistranslation of checkentry return values
+  (affected kernels < 2.6.23)
 
 
 v1.41 (2012-01-04)
index c5b67a486721945d2491dbb64010ee56b02ba567..26f6a00c5770fc4d2f8d2b49a16edd6415d2dcf9 100644 (file)
@@ -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