ikev2: Migrate MOBIKE additional peer addresses to new SA after IKE_SA rekeying
authorMartin Willi <martin@revosec.ch>
Wed, 18 Mar 2015 12:32:27 +0000 (13:32 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 18 Mar 2015 12:32:27 +0000 (13:32 +0100)
src/libcharon/sa/ike_sa.c

index 571c5c0..3aafa4c 100644 (file)
@@ -2260,6 +2260,12 @@ METHOD(ike_sa_t, inherit_post, void,
                array_insert_create(&this->other_vips, ARRAY_TAIL, vip);
        }
 
+       /* MOBIKE additional addresses */
+       while (array_remove(other->peer_addresses, ARRAY_HEAD, &vip))
+       {
+               array_insert_create(&this->peer_addresses, ARRAY_TAIL, vip);
+       }
+
        /* authentication information */
        enumerator = array_create_enumerator(other->my_auths);
        while (enumerator->enumerate(enumerator, &cfg))