ha: Don't adopt IKEv1 children when building without IKEv1 support
authorMartin Willi <martin@revosec.ch>
Thu, 28 Aug 2014 08:16:51 +0000 (10:16 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 28 Aug 2014 08:19:57 +0000 (10:19 +0200)
The adopt_children_job_create() function is not available when IKEv1 support
is disabled. Fixes uncommon builds using --enable-ha --disable-ikev1.

Fixes #690.

src/libcharon/plugins/ha/ha_dispatcher.c

index 6ff24c3..e20e872 100644 (file)
@@ -437,11 +437,13 @@ static void process_ike_update(private_ha_dispatcher_t *this,
                                pools->destroy(pools);
                        }
                }
+#ifdef USE_IKEV1
                if (ike_sa->get_version(ike_sa) == IKEV1)
                {
                        lib->processor->queue_job(lib->processor, (job_t*)
                                                        adopt_children_job_create(ike_sa->get_id(ike_sa)));
                }
+#endif /* USE_IKEV1 */
                this->cache->cache(this->cache, ike_sa, message);
                charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
        }