condition: greatly improve processing speed

Replace the loop over all possible condvars by a simple deref. This
changes the runtime from O(n) to O(1) at the expense of only 8 bytes
for rule.
This commit is contained in:
Jan Engelhardt
2008-04-02 10:19:52 +02:00
parent 32f06cbedf
commit e304252f4b
3 changed files with 27 additions and 37 deletions

View File

@@ -8,6 +8,9 @@ enum {
struct xt_condition_mtinfo {
char name[CONDITION_NAME_LEN];
__u8 invert;
/* Used internally by the kernel */
void *condvar __attribute__((aligned(8)));
};
#endif /* _XT_CONDITION_H */