aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-03-26 16:25:04 +0100
committerMartin Willi <martin@revosec.ch>2010-03-26 16:26:09 +0100
commit28df53339389623166e71beaa628ec9e14c25ba8 (patch)
treefdf0168c47cade4a3e849c2b1fc5003e3cd83baa /src
parent18c68f22c7d522f13baff9199a5fddc1b6978a6f (diff)
downloadstrongswan-28df53339389623166e71beaa628ec9e14c25ba8.tar.bz2
strongswan-28df53339389623166e71beaa628ec9e14c25ba8.tar.xz
Accept messages with a "sufficient" payload if other payloads (such as V) follow
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/encoding/message.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libcharon/encoding/message.c b/src/libcharon/encoding/message.c
index 397a3c609..acfc0fd44 100644
--- a/src/libcharon/encoding/message.c
+++ b/src/libcharon/encoding/message.c
@@ -1539,22 +1539,19 @@ static status_t verify(private_message_t *this)
}
}
}
+ enumerator->destroy(enumerator);
if (found_payloads < rule->min_occurence)
{
DBG1(DBG_ENC, "payload of type %N not occured %d times (%d)",
payload_type_names, rule->payload_type, rule->min_occurence,
found_payloads);
- enumerator->destroy(enumerator);
return VERIFY_ERROR;
}
- if (rule->sufficient &&
- this->payloads->get_count(this->payloads) == total_found_payloads)
+ if (rule->sufficient)
{
- enumerator->destroy(enumerator);
return SUCCESS;
}
- enumerator->destroy(enumerator);
}
return SUCCESS;
}