mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
mode-config: Reassign migrated virtual IP if client requests %any
If we mistakenly detect a new IKE_SA as a reauthentication the client won't request the previous virtual IP, but since we already migrated it we already triggered the assign_vips() hook, so we should reassign the migrated virtual IP. Fixes #1152.
This commit is contained in:
parent
e161238e8e
commit
322a11ccbb
@ -482,7 +482,9 @@ static host_t *assign_migrated_vip(linked_list_t *migrated, host_t *requested)
|
||||
enumerator = migrated->create_enumerator(migrated);
|
||||
while (enumerator->enumerate(enumerator, &vip))
|
||||
{
|
||||
if (vip->ip_equals(vip, requested))
|
||||
if (vip->ip_equals(vip, requested) ||
|
||||
(requested->is_anyaddr(requested) &&
|
||||
requested->get_family(requested) == vip->get_family(vip)))
|
||||
{
|
||||
migrated->remove_at(migrated, enumerator);
|
||||
found = vip;
|
||||
|
Loading…
x
Reference in New Issue
Block a user