diff options
author | Martin Willi <martin@revosec.ch> | 2012-09-18 12:46:36 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-09-18 17:11:03 +0200 |
commit | 7ee37114c91f01a14617388987f1191f63899874 (patch) | |
tree | b45688cd01661b63907972d26ed1b2156b59617a /src/libcharon/config/peer_cfg.c | |
parent | abdb82fcc5dfd97b0a2cfd8e476a17372cdf4d70 (diff) | |
download | strongswan-7ee37114.tar.bz2 strongswan-7ee37114.tar.xz |
Derive a dynamic TS to multiple virtual IPs
Diffstat (limited to 'src/libcharon/config/peer_cfg.c')
-rw-r--r-- | src/libcharon/config/peer_cfg.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcharon/config/peer_cfg.c b/src/libcharon/config/peer_cfg.c index 59869eab2..01ca026e1 100644 --- a/src/libcharon/config/peer_cfg.c +++ b/src/libcharon/config/peer_cfg.c @@ -256,7 +256,7 @@ METHOD(peer_cfg_t, create_child_cfg_enumerator, enumerator_t*, * Check how good a list of TS matches a given child config */ static int get_ts_match(child_cfg_t *cfg, bool local, - linked_list_t *sup_list, host_t *host) + linked_list_t *sup_list, linked_list_t *hosts) { linked_list_t *cfg_list; enumerator_t *sup_enum, *cfg_enum; @@ -264,7 +264,7 @@ static int get_ts_match(child_cfg_t *cfg, bool local, int match = 0, round; /* fetch configured TS list, narrowing dynamic TS */ - cfg_list = cfg->get_traffic_selectors(cfg, local, NULL, host); + cfg_list = cfg->get_traffic_selectors(cfg, local, NULL, hosts); /* use a round counter to rate leading TS with higher priority */ round = sup_list->get_count(sup_list); @@ -297,7 +297,7 @@ static int get_ts_match(child_cfg_t *cfg, bool local, METHOD(peer_cfg_t, select_child_cfg, child_cfg_t*, private_peer_cfg_t *this, linked_list_t *my_ts, linked_list_t *other_ts, - host_t *my_host, host_t *other_host) + linked_list_t *my_hosts, linked_list_t *other_hosts) { child_cfg_t *current, *found = NULL; enumerator_t *enumerator; @@ -309,8 +309,8 @@ METHOD(peer_cfg_t, select_child_cfg, child_cfg_t*, { int my_prio, other_prio; - my_prio = get_ts_match(current, TRUE, my_ts, my_host); - other_prio = get_ts_match(current, FALSE, other_ts, other_host); + my_prio = get_ts_match(current, TRUE, my_ts, my_hosts); + other_prio = get_ts_match(current, FALSE, other_ts, other_hosts); if (my_prio && other_prio) { |