diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /src/libipsec/ipsec_sa.c | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'src/libipsec/ipsec_sa.c')
-rw-r--r-- | src/libipsec/ipsec_sa.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/libipsec/ipsec_sa.c b/src/libipsec/ipsec_sa.c index cccd16404..2ff5cff55 100644 --- a/src/libipsec/ipsec_sa.c +++ b/src/libipsec/ipsec_sa.c @@ -18,7 +18,7 @@ #include "ipsec_sa.h" #include <library.h> -#include <debug.h> +#include <utils/debug.h> typedef struct private_ipsec_sa_t private_ipsec_sa_t; @@ -95,6 +95,20 @@ METHOD(ipsec_sa_t, get_destination, host_t*, return this->dst; } +METHOD(ipsec_sa_t, set_source, void, + private_ipsec_sa_t *this, host_t *addr) +{ + this->src->destroy(this->src); + this->src = addr->clone(addr); +} + +METHOD(ipsec_sa_t, set_destination, void, + private_ipsec_sa_t *this, host_t *addr) +{ + this->dst->destroy(this->dst); + this->dst = addr->clone(addr); +} + METHOD(ipsec_sa_t, get_spi, u_int32_t, private_ipsec_sa_t *this) { @@ -202,6 +216,8 @@ ipsec_sa_t *ipsec_sa_create(u_int32_t spi, host_t *src, host_t *dst, .destroy = _destroy, .get_source = _get_source, .get_destination = _get_destination, + .set_source = _set_source, + .set_destination = _set_destination, .get_spi = _get_spi, .get_reqid = _get_reqid, .get_protocol = _get_protocol, |