diff --git a/doc/changelog.txt b/doc/changelog.txt index 91b17d7..aa07ec5 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -3,6 +3,7 @@ HEAD ==== Fixes: - xt_pknock: avoid crash when hash TFM could not be allocated +- xt_pknock: avoid inversion of rule lookup that led to warnings v1.33 (2011-02-02) diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c index d7fe379..b6f6802 100644 --- a/extensions/pknock/xt_pknock.c +++ b/extensions/pknock/xt_pknock.c @@ -398,19 +398,15 @@ peer_gc(unsigned long r) /** * Compares length and name equality for the rules. - * - * @info - * @rule - * @return: 0 equals, 1 otherwise */ static inline bool rulecmp(const struct xt_pknock_mtinfo *info, const struct xt_pknock_rule *rule) { if (info->rule_name_len != rule->rule_name_len) - return true; + return false; if (strncmp(info->rule_name, rule->rule_name, info->rule_name_len) != 0) - return true; - return false; + return false; + return true; } /**