diff options
author | Martin Willi <martin@revosec.ch> | 2012-12-10 17:01:00 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-12-10 17:01:00 +0100 |
commit | 43b4c2ea75ff5434730988f4c3a7cd0ac33ae6fd (patch) | |
tree | 73bde7ac08871ac0d2bd128aff2d4d1330c2eaa4 /src | |
parent | caccc0e8cc069fd70906e3aac80e06e72e35e2dd (diff) | |
download | strongswan-43b4c2ea75ff5434730988f4c3a7cd0ac33ae6fd.tar.bz2 strongswan-43b4c2ea75ff5434730988f4c3a7cd0ac33ae6fd.tar.xz |
Inherit virtual IP and attributes from old to new, not from new to old
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/ike_sa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c index 48621111d..de050cd3c 100644 --- a/src/libcharon/sa/ike_sa.c +++ b/src/libcharon/sa/ike_sa.c @@ -1979,14 +1979,14 @@ METHOD(ike_sa_t, inherit, void, this->other_id = other->other_id->clone(other->other_id); /* apply assigned virtual IPs... */ - while (this->my_vips->remove_last(this->my_vips, (void**)&vip) == SUCCESS) + while (other->my_vips->remove_last(other->my_vips, (void**)&vip) == SUCCESS) { - other->my_vips->insert_first(other->my_vips, vip); + this->my_vips->insert_first(this->my_vips, vip); } - while (this->other_vips->remove_last(this->other_vips, - (void**)&vip) == SUCCESS) + while (other->other_vips->remove_last(other->other_vips, + (void**)&vip) == SUCCESS) { - other->other_vips->insert_first(other->other_vips, vip); + this->other_vips->insert_first(this->other_vips, vip); } /* authentication information */ |