Extended nonce payload for IKEv1 support
[strongswan.git] / src / libcharon / sa / tasks / child_create.c
index 67c29d3..587e37a 100644 (file)
@@ -526,18 +526,20 @@ static void build_payloads(private_child_create_t *this, message_t *message)
        /* add SA payload */
        if (this->initiator)
        {
-               sa_payload = sa_payload_create_from_proposal_list(this->proposals);
+               sa_payload = sa_payload_create_from_proposal_list(SECURITY_ASSOCIATION,
+                                                                                                                 this->proposals);
        }
        else
        {
-               sa_payload = sa_payload_create_from_proposal(this->proposal);
+               sa_payload = sa_payload_create_from_proposal(SECURITY_ASSOCIATION,
+                                                                                                        this->proposal);
        }
        message->add_payload(message, (payload_t*)sa_payload);
 
        /* add nonce payload if not in IKE_AUTH */
        if (message->get_exchange_type(message) == CREATE_CHILD_SA)
        {
-               nonce_payload = nonce_payload_create();
+               nonce_payload = nonce_payload_create(NONCE);
                nonce_payload->set_nonce(nonce_payload, this->my_nonce);
                message->add_payload(message, (payload_t*)nonce_payload);
        }