apply peer config during rekeying
authorMartin Willi <martin@strongswan.org>
Fri, 28 Nov 2008 16:40:16 +0000 (16:40 +0000)
committerMartin Willi <martin@revosec.ch>
Wed, 7 Apr 2010 11:55:12 +0000 (13:55 +0200)
src/charon/plugins/ha_sync/ha_sync_dispatcher.c

index 78c62c0..be6a785 100644 (file)
@@ -139,7 +139,13 @@ static void process_ike_add(private_ha_sync_dispatcher_t *this,
                {
                        if (old_sa)
                        {
-                               ike_sa->inherit(ike_sa, old_sa);
+                               peer_cfg_t *peer_cfg = old_sa->get_peer_cfg(old_sa);
+
+                               if (peer_cfg)
+                               {
+                                       ike_sa->set_peer_cfg(ike_sa, peer_cfg);
+                                       ike_sa->inherit(ike_sa, old_sa);
+                               }
                                charon->ike_sa_manager->checkin_and_destroy(
                                                                                                charon->ike_sa_manager, old_sa);
                                old_sa = NULL;