Accept IKEv1 INVALID_KE_INFORMATION notifies without data
authorMartin Willi <martin@revosec.ch>
Wed, 21 Dec 2011 14:01:29 +0000 (15:01 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:30 +0000 (17:31 +0100)
src/libcharon/encoding/payloads/notify_payload.c

index 19a32d6..6f37842 100644 (file)
@@ -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;
                        }