completed migration of MIPv6 connections

This commit is contained in:
Andreas Steffen
2008-11-16 21:19:58 +00:00
parent ad60c249b6
commit 7a915d627d
5 changed files with 75 additions and 36 deletions
@@ -580,8 +580,7 @@ static void process_migrate(private_kernel_netlink_ipsec_t *this, struct nlmsghd
dst_ts = selector2ts(&policy_id->sel, FALSE);
dir = (policy_dir_t)policy_id->dir;
DBG2(DBG_KNL, " policy: %R === %R %N, index %u", src_ts, dst_ts,
policy_dir_names, dir, policy_id->index);
DBG2(DBG_KNL, " policy: %R === %R %N", src_ts, dst_ts, policy_dir_names);
while (RTA_OK(rta, rtasize))
{
@@ -618,7 +617,7 @@ static void process_migrate(private_kernel_netlink_ipsec_t *this, struct nlmsghd
rta = RTA_NEXT(rta, rtasize);
}
if (src_ts && dst_ts)
if (src_ts && dst_ts && local && remote)
{
DBG1(DBG_KNL, "creating migrate job for policy %R === %R %N with reqid {%u}",
src_ts, dst_ts, policy_dir_names, dir, reqid, local);
@@ -858,7 +858,7 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
dst_ts = sadb_address2ts(response.dst);
dir = kernel2dir(response.x_policy->sadb_x_policy_dir);
DBG2(DBG_KNL, " policy %R === %R %N, id %u", src_ts, dst_ts,
policy_dir_names, dir, response.x_policy->sadb_x_policy_id);
policy_dir_names, dir);
/* SADB_X_EXT_KMADDRESS is not present in unpatched kernels < 2.6.28 */
if (response.x_kmaddress)
@@ -875,7 +875,7 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
DBG2(DBG_KNL, " kmaddress: %H...%H", local, remote);
}
if (src_ts && dst_ts)
if (src_ts && dst_ts && local && remote)
{
DBG1(DBG_KNL, "creating migrate job for policy %R === %R %N with reqid {%u}",
src_ts, dst_ts, policy_dir_names, dir, reqid, local);