mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-09 00:00:53 -04:00
trap-manager: Remove unused find_reqid() method
It might actually have returned an incorrect result if there were child configs for different peer configs sharing the same name.
This commit is contained in:
parent
c9998e5fea
commit
a541cf05c1
@ -411,31 +411,6 @@ METHOD(trap_manager_t, create_enumerator, enumerator_t*,
|
|||||||
(void*)this->lock->unlock);
|
(void*)this->lock->unlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
METHOD(trap_manager_t, find_reqid, uint32_t,
|
|
||||||
private_trap_manager_t *this, child_cfg_t *child)
|
|
||||||
{
|
|
||||||
enumerator_t *enumerator;
|
|
||||||
entry_t *entry;
|
|
||||||
uint32_t reqid = 0;
|
|
||||||
|
|
||||||
this->lock->read_lock(this->lock);
|
|
||||||
enumerator = this->traps->create_enumerator(this->traps);
|
|
||||||
while (enumerator->enumerate(enumerator, &entry))
|
|
||||||
{
|
|
||||||
if (streq(entry->name, child->get_name(child)))
|
|
||||||
{
|
|
||||||
if (entry->child_sa)
|
|
||||||
{
|
|
||||||
reqid = entry->child_sa->get_reqid(entry->child_sa);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
enumerator->destroy(enumerator);
|
|
||||||
this->lock->unlock(this->lock);
|
|
||||||
return reqid;
|
|
||||||
}
|
|
||||||
|
|
||||||
METHOD(trap_manager_t, acquire, void,
|
METHOD(trap_manager_t, acquire, void,
|
||||||
private_trap_manager_t *this, uint32_t reqid,
|
private_trap_manager_t *this, uint32_t reqid,
|
||||||
traffic_selector_t *src, traffic_selector_t *dst)
|
traffic_selector_t *src, traffic_selector_t *dst)
|
||||||
@ -691,7 +666,6 @@ trap_manager_t *trap_manager_create(void)
|
|||||||
.install = _install,
|
.install = _install,
|
||||||
.uninstall = _uninstall,
|
.uninstall = _uninstall,
|
||||||
.create_enumerator = _create_enumerator,
|
.create_enumerator = _create_enumerator,
|
||||||
.find_reqid = _find_reqid,
|
|
||||||
.acquire = _acquire,
|
.acquire = _acquire,
|
||||||
.flush = _flush,
|
.flush = _flush,
|
||||||
.destroy = _destroy,
|
.destroy = _destroy,
|
||||||
|
@ -61,14 +61,6 @@ struct trap_manager_t {
|
|||||||
*/
|
*/
|
||||||
enumerator_t* (*create_enumerator)(trap_manager_t *this);
|
enumerator_t* (*create_enumerator)(trap_manager_t *this);
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the reqid of a child config installed as a trap.
|
|
||||||
*
|
|
||||||
* @param child CHILD_SA config to get the reqid for
|
|
||||||
* @return reqid of trap, 0 if not found
|
|
||||||
*/
|
|
||||||
uint32_t (*find_reqid)(trap_manager_t *this, child_cfg_t *child);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Acquire an SA triggered by an installed trap.
|
* Acquire an SA triggered by an installed trap.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user