ike-mobike: Send retransmits to the current local and remote addresses
authorTobias Brunner <tobias@strongswan.org>
Wed, 23 Sep 2015 08:53:20 +0000 (10:53 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 30 Oct 2015 09:51:07 +0000 (10:51 +0100)
These might have changed by a peer-initiated MOBIKE address update.

Fixes #1125.

src/libcharon/sa/ikev2/tasks/ike_mobike.c

index 11b0bb2..cbdc5e7 100644 (file)
@@ -339,7 +339,11 @@ METHOD(ike_mobike_t, transmit, bool,
                {
                        if (me->ip_equals(me, me_old))
                        {
-                               charon->sender->send(charon->sender, packet->clone(packet));
+                               copy = packet->clone(packet);
+                               /* hosts might have been updated by a peer's MOBIKE exchange */
+                               copy->set_source(copy, me_old->clone(me_old));
+                               copy->set_destination(copy, other_old->clone(other_old));
+                               charon->sender->send(charon->sender, copy);
                                me->destroy(me);
                                return TRUE;
                        }