Support multiple address pools configured on a peer_cfg
This commit is contained in:
@@ -611,6 +611,20 @@ METHOD(phase1_t, has_virtual_ip, bool,
|
||||
return found;
|
||||
}
|
||||
|
||||
METHOD(phase1_t, has_pool, bool,
|
||||
private_phase1_t *this, peer_cfg_t *peer_cfg)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
bool found = FALSE;
|
||||
char *pool;
|
||||
|
||||
enumerator = peer_cfg->create_pool_enumerator(peer_cfg);
|
||||
found = enumerator->enumerate(enumerator, &pool);
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
METHOD(phase1_t, save_sa_payload, bool,
|
||||
private_phase1_t *this, message_t *message)
|
||||
{
|
||||
@@ -751,6 +765,7 @@ phase1_t *phase1_create(ike_sa_t *ike_sa, bool initiator)
|
||||
.get_id = _get_id,
|
||||
.select_config = _select_config,
|
||||
.has_virtual_ip = _has_virtual_ip,
|
||||
.has_pool = _has_pool,
|
||||
.verify_auth = _verify_auth,
|
||||
.build_auth = _build_auth,
|
||||
.save_sa_payload = _save_sa_payload,
|
||||
|
||||
Reference in New Issue
Block a user