trap-manager: Allow local address to be unspecified
If there is currently no route to reach the other peer we just default to left=%any. The local address is only really used to resolve leftsubnet=%dynamic anyway (and perhaps for MIPv6 proxy transport mode). Fixes #1375.
This commit is contained in:
@@ -197,9 +197,7 @@ METHOD(trap_manager_t, install, uint32_t,
|
|||||||
me = charon->kernel->get_source_addr(charon->kernel, other, NULL);
|
me = charon->kernel->get_source_addr(charon->kernel, other, NULL);
|
||||||
if (!me)
|
if (!me)
|
||||||
{
|
{
|
||||||
DBG1(DBG_CFG, "installing trap failed, local address unknown");
|
me = host_create_any(other->get_family(other));
|
||||||
other->destroy(other);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
me->set_port(me, ike_cfg->get_my_port(ike_cfg));
|
me->set_port(me, ike_cfg->get_my_port(ike_cfg));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user