xt_pknock: avoid inversion of rule lookup that led to warnings

Commit v1.18-48-g58839b9 had this screwed up.
This commit is contained in:
Jan Engelhardt
2011-02-24 23:58:03 +01:00
parent 0ba44bd461
commit 32871bad39
2 changed files with 4 additions and 7 deletions

View File

@@ -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;
}
/**