RFC 7296, section 2.21.3:
If a peer parsing a request notices that it is badly formatted (after
it has passed the message authentication code checks and window
checks) and it returns an INVALID_SYNTAX notification, then this
error notification is considered fatal in both peers, meaning that
the IKE SA is deleted without needing an explicit Delete payload.
return DESTROY_ME;
}
+ /* handle fatal INVALID_SYNTAX notifies */
+ switch (message->get_exchange_type(message))
+ {
+ case CREATE_CHILD_SA:
+ case INFORMATIONAL:
+ if (message->get_notify(message, INVALID_SYNTAX))
+ {
+ DBG1(DBG_IKE, "received %N notify error, destroying IKE_SA",
+ notify_type_names, INVALID_SYNTAX);
+ charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
+ return DESTROY_ME;
+ }
+ break;
+ default:
+ break;
+ }
+
enumerator = array_create_enumerator(this->active_tasks);
while (enumerator->enumerate(enumerator, &task))
{