Request limits from TKM on init
authorReto Buerki <reet@codelabs.ch>
Thu, 9 Aug 2012 13:12:40 +0000 (15:12 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 19 Mar 2013 14:23:45 +0000 (15:23 +0100)
src/charon-tkm/src/tkm/tkm.c

index ebff089..e913ddb 100644 (file)
@@ -46,6 +46,14 @@ bool tkm_init()
 {
        private_tkm_t *this;
 
+       active_requests_type max_requests;
+       nc_id_type nc;
+       dh_id_type dh;
+       cc_id_type cc;
+       ae_id_type ae;
+       isa_id_type isa;
+       esa_id_type esa;
+
        /* initialize TKM client library */
        tkmlib_init();
        if (ike_init(IKE_SOCKET) != TKM_OK)
@@ -60,6 +68,13 @@ bool tkm_init()
                return FALSE;
        }
 
+       /* get limits from tkm */
+       if (ike_tkm_limits(&max_requests, &nc, &dh, &cc, &ae, &isa, &esa) != TKM_OK)
+       {
+               tkmlib_final();
+               return FALSE;
+       }
+
        INIT(this,
                .public = {
                        .idmgr = tkm_id_manager_create(),