mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -04:00
ike-config: Support IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH
This changes the MID of the first IKE_AUTH message.
This commit is contained in:
parent
7030cc7b7f
commit
a06da8a526
@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (C) 2012-2018 Tobias Brunner
|
||||||
* Copyright (C) 2007 Martin Willi
|
* Copyright (C) 2007 Martin Willi
|
||||||
* Copyright (C) 2006-2007 Fabian Hartmann, Noah Heusser
|
* Copyright (C) 2006-2007 Fabian Hartmann, Noah Heusser
|
||||||
* HSR Hochschule fuer Technik Rapperswil
|
* HSR Hochschule fuer Technik Rapperswil
|
||||||
@ -239,8 +240,8 @@ static void process_payloads(private_ike_config_t *this, message_t *message)
|
|||||||
METHOD(task_t, build_i, status_t,
|
METHOD(task_t, build_i, status_t,
|
||||||
private_ike_config_t *this, message_t *message)
|
private_ike_config_t *this, message_t *message)
|
||||||
{
|
{
|
||||||
if (message->get_message_id(message) == 1)
|
if (message->get_exchange_type(message) == IKE_AUTH)
|
||||||
{ /* in first IKE_AUTH only */
|
{
|
||||||
cp_payload_t *cp = NULL;
|
cp_payload_t *cp = NULL;
|
||||||
enumerator_t *enumerator;
|
enumerator_t *enumerator;
|
||||||
attribute_handler_t *handler;
|
attribute_handler_t *handler;
|
||||||
@ -250,6 +251,9 @@ METHOD(task_t, build_i, status_t,
|
|||||||
linked_list_t *vips;
|
linked_list_t *vips;
|
||||||
host_t *host;
|
host_t *host;
|
||||||
|
|
||||||
|
/* in first IKE_AUTH only */
|
||||||
|
this->public.task.build = (void*)return_need_more;
|
||||||
|
|
||||||
vips = linked_list_create();
|
vips = linked_list_create();
|
||||||
|
|
||||||
/* reuse virtual IP if we already have one */
|
/* reuse virtual IP if we already have one */
|
||||||
@ -328,9 +332,11 @@ METHOD(task_t, build_i, status_t,
|
|||||||
METHOD(task_t, process_r, status_t,
|
METHOD(task_t, process_r, status_t,
|
||||||
private_ike_config_t *this, message_t *message)
|
private_ike_config_t *this, message_t *message)
|
||||||
{
|
{
|
||||||
if (message->get_message_id(message) == 1)
|
if (message->get_exchange_type(message) == IKE_AUTH)
|
||||||
{ /* in first IKE_AUTH only */
|
{
|
||||||
process_payloads(this, message);
|
process_payloads(this, message);
|
||||||
|
/* in first IKE_AUTH only */
|
||||||
|
this->public.task.process = (void*)return_need_more;
|
||||||
}
|
}
|
||||||
return NEED_MORE;
|
return NEED_MORE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user