mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
compat_xtables: fixed mistranslation of checkentry return values
This commit is contained in:
@@ -13,7 +13,7 @@ match:
|
|||||||
int *hotdrop,
|
int *hotdrop,
|
||||||
);
|
);
|
||||||
|
|
||||||
/* error code */
|
/* true/false */
|
||||||
int
|
int
|
||||||
(*checkentry)(
|
(*checkentry)(
|
||||||
const char *tablename,
|
const char *tablename,
|
||||||
@@ -45,7 +45,7 @@ target:
|
|||||||
void *userdata,
|
void *userdata,
|
||||||
);
|
);
|
||||||
|
|
||||||
/* error code */
|
/* true/false */
|
||||||
int
|
int
|
||||||
(*checkentry)(
|
(*checkentry)(
|
||||||
const char *tablename,
|
const char *tablename,
|
||||||
|
@@ -13,7 +13,7 @@ match:
|
|||||||
int *hotdrop,
|
int *hotdrop,
|
||||||
);
|
);
|
||||||
|
|
||||||
/* error code */
|
/* true/false */
|
||||||
int
|
int
|
||||||
(*checkentry)(
|
(*checkentry)(
|
||||||
const char *tablename,
|
const char *tablename,
|
||||||
@@ -42,7 +42,7 @@ target:
|
|||||||
const void *targinfo,
|
const void *targinfo,
|
||||||
);
|
);
|
||||||
|
|
||||||
/* error code */
|
/* true/false */
|
||||||
int
|
int
|
||||||
(*checkentry)(
|
(*checkentry)(
|
||||||
const char *tablename,
|
const char *tablename,
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
|
|
||||||
HEAD
|
HEAD
|
||||||
====
|
====
|
||||||
|
Fixes:
|
||||||
|
- compat_xtables: fixed mistranslation of checkentry return values
|
||||||
|
(affected kernels < 2.6.23)
|
||||||
|
|
||||||
|
|
||||||
v1.41 (2012-01-04)
|
v1.41 (2012-01-04)
|
||||||
|
@@ -110,11 +110,7 @@ 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);
|
|
||||||
#else
|
|
||||||
return nm->checkentry(&local_par) == 0;
|
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) && \
|
||||||
@@ -322,11 +318,7 @@ 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);
|
|
||||||
#else
|
|
||||||
return nt->checkentry(&local_par) == 0;
|
return nt->checkentry(&local_par) == 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user