mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
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:
@@ -3,6 +3,7 @@ HEAD
|
|||||||
====
|
====
|
||||||
Fixes:
|
Fixes:
|
||||||
- xt_pknock: avoid crash when hash TFM could not be allocated
|
- 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)
|
v1.33 (2011-02-02)
|
||||||
|
@@ -398,19 +398,15 @@ peer_gc(unsigned long r)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares length and name equality for the rules.
|
* Compares length and name equality for the rules.
|
||||||
*
|
|
||||||
* @info
|
|
||||||
* @rule
|
|
||||||
* @return: 0 equals, 1 otherwise
|
|
||||||
*/
|
*/
|
||||||
static inline bool
|
static inline bool
|
||||||
rulecmp(const struct xt_pknock_mtinfo *info, const struct xt_pknock_rule *rule)
|
rulecmp(const struct xt_pknock_mtinfo *info, const struct xt_pknock_rule *rule)
|
||||||
{
|
{
|
||||||
if (info->rule_name_len != rule->rule_name_len)
|
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)
|
if (strncmp(info->rule_name, rule->rule_name, info->rule_name_len) != 0)
|
||||||
return true;
|
return false;
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user