Reuse reqid for trap policies installed for dpd|closeaction=hold
This commit is contained in:
committed by
Andreas Steffen
parent
156e552caf
commit
4c74fa664b
@@ -245,7 +245,7 @@ static void setup_tunnel(private_ha_tunnel_t *this,
|
||||
charon->backends->add_backend(charon->backends, &this->backend.public);
|
||||
|
||||
/* install an acquiring trap */
|
||||
this->trap = charon->traps->install(charon->traps, peer_cfg, child_cfg);
|
||||
this->trap = charon->traps->install(charon->traps, peer_cfg, child_cfg, 0);
|
||||
}
|
||||
|
||||
METHOD(ha_tunnel_t, destroy, void,
|
||||
|
||||
@@ -603,7 +603,7 @@ static void charon_route(peer_cfg_t *peer_cfg, child_cfg_t *child_cfg,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (charon->traps->install(charon->traps, peer_cfg, child_cfg))
|
||||
if (charon->traps->install(charon->traps, peer_cfg, child_cfg, 0))
|
||||
{
|
||||
fprintf(out, "'%s' routed\n", name);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ METHOD(job_t, execute, job_requeue_t,
|
||||
else
|
||||
{
|
||||
charon->traps->install(charon->traps, peer_cfg,
|
||||
child_cfg);
|
||||
child_cfg, 0);
|
||||
}
|
||||
break;
|
||||
case ACTION_NONE:
|
||||
|
||||
@@ -1575,7 +1575,8 @@ METHOD(ike_sa_t, reestablish, status_t,
|
||||
break;
|
||||
case ACTION_ROUTE:
|
||||
charon->traps->install(charon->traps, this->peer_cfg,
|
||||
child_sa->get_config(child_sa));
|
||||
child_sa->get_config(child_sa),
|
||||
child_sa->get_reqid(child_sa));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -227,7 +227,8 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
|
||||
break;
|
||||
case ACTION_ROUTE:
|
||||
charon->traps->install(charon->traps,
|
||||
this->ike_sa->get_peer_cfg(this->ike_sa), child_cfg);
|
||||
this->ike_sa->get_peer_cfg(this->ike_sa), child_cfg,
|
||||
child_sa->get_reqid(child_sa));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -92,7 +92,8 @@ static void destroy_entry(entry_t *entry)
|
||||
}
|
||||
|
||||
METHOD(trap_manager_t, install, u_int32_t,
|
||||
private_trap_manager_t *this, peer_cfg_t *peer, child_cfg_t *child)
|
||||
private_trap_manager_t *this, peer_cfg_t *peer, child_cfg_t *child,
|
||||
u_int32_t reqid)
|
||||
{
|
||||
entry_t *entry, *found = NULL;
|
||||
ike_cfg_t *ike_cfg;
|
||||
@@ -101,7 +102,6 @@ METHOD(trap_manager_t, install, u_int32_t,
|
||||
linked_list_t *my_ts, *other_ts, *list;
|
||||
enumerator_t *enumerator;
|
||||
status_t status;
|
||||
u_int32_t reqid = 0;
|
||||
|
||||
/* try to resolve addresses */
|
||||
ike_cfg = peer->get_ike_cfg(peer);
|
||||
|
||||
@@ -37,10 +37,11 @@ struct trap_manager_t {
|
||||
*
|
||||
* @param peer peer configuration to initiate on trap
|
||||
* @param child child configuration to install as a trap
|
||||
* @param reqid optional reqid to use
|
||||
* @return reqid of installed CHILD_SA, 0 if failed
|
||||
*/
|
||||
u_int32_t (*install)(trap_manager_t *this, peer_cfg_t *peer,
|
||||
child_cfg_t *child);
|
||||
child_cfg_t *child, u_int32_t reqid);
|
||||
|
||||
/**
|
||||
* Uninstall a trap policy.
|
||||
|
||||
Reference in New Issue
Block a user