diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-07-13 13:21:45 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-08-08 15:41:03 +0200 |
commit | 914479370ed23aa420a15ef3f19c2c39dce3b133 (patch) | |
tree | 4f62f594f23065f6a8e2803732a1f8de3b8f44f2 /src/libipsec/ipsec.c | |
parent | 9f7e1899a90c2ffbdbac626d4d58945460eca97c (diff) | |
download | strongswan-914479370ed23aa420a15ef3f19c2c39dce3b133.tar.bz2 strongswan-914479370ed23aa420a15ef3f19c2c39dce3b133.tar.xz |
Added IPsec SA manager
Diffstat (limited to 'src/libipsec/ipsec.c')
-rw-r--r-- | src/libipsec/ipsec.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libipsec/ipsec.c b/src/libipsec/ipsec.c index add3b463a..5ae6c74aa 100644 --- a/src/libipsec/ipsec.c +++ b/src/libipsec/ipsec.c @@ -1,4 +1,6 @@ /* + * Copyright (C) 2012 Giuliano Grassi + * Copyright (C) 2012 Ralf Sager * Copyright (C) 2012 Tobias Brunner * Hochschule fuer Technik Rapperswil * @@ -41,6 +43,7 @@ ipsec_t *ipsec; void libipsec_deinit() { private_ipsec_t *this = (private_ipsec_t*)ipsec; + DESTROY_IF(this->public.sas); free(this); ipsec = NULL; } @@ -52,10 +55,7 @@ bool libipsec_init() { private_ipsec_t *this; - INIT(this, - .public = { - }, - ); + INIT(this); ipsec = &this->public; if (lib->integrity && @@ -64,6 +64,8 @@ bool libipsec_init() DBG1(DBG_LIB, "integrity check of libipsec failed"); return FALSE; } + + this->public.sas = ipsec_sa_mgr_create(); return TRUE; } |