ID payload with explicit payload type

This commit is contained in:
Tobias Brunner
2007-10-02 11:55:10 +00:00
parent 1fbcbe32d0
commit 56db479192
4 changed files with 20 additions and 69 deletions
+2 -2
View File
@@ -157,13 +157,13 @@ static status_t build_id(private_ike_auth_t *this, message_t *message)
this->ike_sa->set_my_id(this->ike_sa, me->clone(me));
}
id = id_payload_create_from_identification(this->initiator, me);
id = id_payload_create_from_identification(this->initiator ? ID_INITIATOR : ID_RESPONDER, me);
message->add_payload(message, (payload_t*)id);
/* as initiator, include other ID if it does not contain wildcards */
if (this->initiator && !other->contains_wildcards(other))
{
id = id_payload_create_from_identification(FALSE, other);
id = id_payload_create_from_identification(ID_RESPONDER, other);
message->add_payload(message, (payload_t*)id);
}
return SUCCESS;