diff options
author | Martin Willi <martin@revosec.ch> | 2012-08-24 12:31:24 +0000 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-08-30 16:43:42 +0200 |
commit | 497ce2cf51d3e80302e24e5bdf7df566d80b4828 (patch) | |
tree | 311e91603cae7981db1ace7009a0e880cb87eed5 /src/libcharon/plugins/stroke/stroke_config.c | |
parent | 101d26babeae0a6444bf7a355cbd3fb2e7497fae (diff) | |
download | strongswan-497ce2cf51d3e80302e24e5bdf7df566d80b4828.tar.bz2 strongswan-497ce2cf51d3e80302e24e5bdf7df566d80b4828.tar.xz |
Support multiple address pools configured on a peer_cfg
Diffstat (limited to 'src/libcharon/plugins/stroke/stroke_config.c')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_config.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c index e3ea5428a..5f32072ce 100644 --- a/src/libcharon/plugins/stroke/stroke_config.c +++ b/src/libcharon/plugins/stroke/stroke_config.c @@ -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); |