Support multiple address pools configured on a peer_cfg

This commit is contained in:
Martin Willi
2012-08-30 16:43:42 +02:00
parent 101d26babe
commit 497ce2cf51
25 changed files with 151 additions and 55 deletions
+8 -2
View File
@@ -778,13 +778,19 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this,
msg->add_conn.rekey.tries, rekey, reauth, jitter, over,
msg->add_conn.mobike, msg->add_conn.aggressive,
msg->add_conn.dpd.delay, msg->add_conn.dpd.timeout,
msg->add_conn.other.sourceip_mask ?
msg->add_conn.name : msg->add_conn.other.sourceip,
msg->add_conn.ikeme.mediation, mediated_by, peer_id);
if (vip)
{
peer_cfg->add_virtual_ip(peer_cfg, vip);
}
if (msg->add_conn.other.sourceip_mask)
{
peer_cfg->add_pool(peer_cfg, msg->add_conn.name);
}
else if (msg->add_conn.other.sourceip)
{
peer_cfg->add_pool(peer_cfg, msg->add_conn.other.sourceip);
}
/* build leftauth= */
auth_cfg = build_auth_cfg(this, msg, TRUE, TRUE);