Allow creation of message_t objects for IKEv1 packets.
[strongswan.git] / src / conftest / hooks / unencrypted_notify.c
index 8737158..507f30c 100644 (file)
@@ -75,7 +75,7 @@ METHOD(listener_t, ike_updown, bool,
                                return TRUE;
                        }
                }
-               if (strncasecmp(this->data, "0x", 2) == 0)
+               if (strncaseeq(this->data, "0x", 2))
                {
                        data = chunk_skip(chunk_create(this->data, strlen(this->data)), 2);
                        data = chunk_from_hex(data, NULL);
@@ -95,7 +95,7 @@ METHOD(listener_t, ike_updown, bool,
 
                DBG1(DBG_CFG, "injecting unencrypted INFORMATIONAL message");
 
-               message = message_create();
+               message = message_create(IKEV2_MAJOR_VERSION, IKEV2_MINOR_VERSION);
                message->set_message_id(message, this->id);
                message->set_ike_sa_id(message, ike_sa->get_id(ike_sa));
                message->set_exchange_type(message, INFORMATIONAL);