aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/processing
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2008-11-16 21:19:58 +0000
committerAndreas Steffen <andreas.steffen@strongswan.org>2008-11-16 21:19:58 +0000
commit7a915d627daadb64ebd46a892dd0ee53b42d1862 (patch)
tree30ad96d29b5975087ad53eaf38ad834cd4238c41 /src/charon/processing
parentad60c249b6784b8646a829b75eba081e5e5d29c4 (diff)
downloadstrongswan-7a915d627daadb64ebd46a892dd0ee53b42d1862.tar.bz2
strongswan-7a915d627daadb64ebd46a892dd0ee53b42d1862.tar.xz
completed migration of MIPv6 connections
Diffstat (limited to 'src/charon/processing')
-rw-r--r--src/charon/processing/jobs/migrate_job.c30
-rw-r--r--src/charon/processing/jobs/migrate_job.h1
2 files changed, 31 insertions, 0 deletions
diff --git a/src/charon/processing/jobs/migrate_job.c b/src/charon/processing/jobs/migrate_job.c
index f9b1df26b..92bdac04f 100644
--- a/src/charon/processing/jobs/migrate_job.c
+++ b/src/charon/processing/jobs/migrate_job.c
@@ -85,8 +85,38 @@ static void execute(private_migrate_job_t *this)
}
if (ike_sa)
{
+ iterator_t *children;
+ child_sa_t *child_sa;
+ host_t *host;
+
+ children = ike_sa->create_child_sa_iterator(ike_sa);
+ while (children->iterate(children, (void**)&child_sa))
+ {
+ if (child_sa->get_reqid(child_sa) == this->reqid)
+ {
+ break;
+ }
+ }
+ children->destroy(children);
DBG2(DBG_JOB, "found CHILD_SA with reqid {%d}", this->reqid);
+
ike_sa->set_kmaddress(ike_sa, this->local, this->remote);
+
+ host = this->local->clone(this->local);
+ host->set_port(host, IKEV2_UDP_PORT);
+ ike_sa->set_my_host(ike_sa, host);
+
+ host = this->remote->clone(this->remote);
+ host->set_port(host, IKEV2_UDP_PORT);
+ ike_sa->set_other_host(ike_sa, host);
+
+ if (child_sa->update_hosts(child_sa, this->local, this->remote,
+ ike_sa->get_virtual_ip(ike_sa, TRUE),
+ ike_sa->has_condition(ike_sa, COND_NAT_ANY)) == NOT_SUPPORTED)
+ {
+ ike_sa->rekey_child_sa(ike_sa, child_sa->get_protocol(child_sa),
+ child_sa->get_spi(child_sa, TRUE));
+ }
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
}
else
diff --git a/src/charon/processing/jobs/migrate_job.h b/src/charon/processing/jobs/migrate_job.h
index ecd2d6fe5..09e6ba097 100644
--- a/src/charon/processing/jobs/migrate_job.h
+++ b/src/charon/processing/jobs/migrate_job.h
@@ -51,6 +51,7 @@ struct migrate_job_t {
* @param reqid reqid of the CHILD_SA to acquire
* @param src_ts source traffic selector to be used in the policy
* @param dst_ts destination traffic selector to be used in the policy
+ * @param dir direction of the policy (in|out)
* @param local local host address to be used in the IKE_SA
* @param remote remote host address to be used in the IKE_SA
* @return migrate_job_t object