aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-11-21 11:24:38 +0100
committerTobias Brunner <tobias@strongswan.org>2012-03-20 17:30:45 +0100
commit3d59c5c3820f51ad875beb539f37020bf0582096 (patch)
tree32e2b4473311998ff5dd06653bbf361c7321617a /src
parent0cec72df400b7009c839248872b030450d20fe02 (diff)
downloadstrongswan-3d59c5c3820f51ad875beb539f37020bf0582096.tar.bz2
strongswan-3d59c5c3820f51ad875beb539f37020bf0582096.tar.xz
Update cached hosts on ike_sa_t when processing IKEv1 messages.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/sa/task_manager_v1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libcharon/sa/task_manager_v1.c b/src/libcharon/sa/task_manager_v1.c
index c96adaa39..9be034fb2 100644
--- a/src/libcharon/sa/task_manager_v1.c
+++ b/src/libcharon/sa/task_manager_v1.c
@@ -531,14 +531,20 @@ METHOD(task_manager_t, process_message, status_t,
private_task_manager_t *this, message_t *msg)
{
u_int32_t hash, mid;
+ host_t *me, *other;
mid = msg->get_message_id(msg);
hash = chunk_hash(msg->get_packet_data(msg));
+ /* TODO-IKEv1: update hosts more selectively */
+ me = msg->get_destination(msg);
+ other = msg->get_source(msg);
+
if ((mid && mid == this->initiating.mid) ||
(this->initiating.mid == 0 &&
this->active_tasks->get_count(this->active_tasks)))
{
+ this->ike_sa->update_hosts(this->ike_sa, me, other, TRUE);
charon->bus->message(charon->bus, msg, FALSE);
if (process_response(this, msg) != SUCCESS)
{
@@ -557,7 +563,7 @@ METHOD(task_manager_t, process_message, status_t,
this->responding.packet->clone(this->responding.packet));
return SUCCESS;
}
-
+ this->ike_sa->update_hosts(this->ike_sa, me, other, TRUE);
charon->bus->message(charon->bus, msg, TRUE);
if (process_request(this, msg) != SUCCESS)
{