From 96f98a8c1164c9f08d1015b67434db248781ad63 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 21 Dec 2011 15:01:29 +0100 Subject: [PATCH] Accept IKEv1 INVALID_KE_INFORMATION notifies without data --- src/libcharon/encoding/payloads/notify_payload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcharon/encoding/payloads/notify_payload.c b/src/libcharon/encoding/payloads/notify_payload.c index 19a32d696..6f3784219 100644 --- a/src/libcharon/encoding/payloads/notify_payload.c +++ b/src/libcharon/encoding/payloads/notify_payload.c @@ -405,7 +405,7 @@ METHOD(payload_t, verify, status_t, { case INVALID_KE_PAYLOAD: { - if (this->notify_data.len != 2) + if (this->type == NOTIFY && this->notify_data.len != 2) { bad_length = TRUE; } @@ -425,7 +425,7 @@ METHOD(payload_t, verify, status_t, case INVALID_MAJOR_VERSION: case NO_PROPOSAL_CHOSEN: { - if ((this->notify_data.len != 0) && (this->type == NOTIFY)) + if (this->type == NOTIFY && this->notify_data.len != 0) { bad_length = TRUE; }