diff options
author | Martin Willi <martin@strongswan.org> | 2009-08-25 18:12:55 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-08-25 18:12:55 +0200 |
commit | 1bc0b4f7959ca4ddb2af0715599e3a177a6e2f01 (patch) | |
tree | 7066076232e1db43253f7b6455c2b6fe61eea706 /src/charon | |
parent | 625b48b5586c3e212a14007232074b9bd03318b8 (diff) | |
download | strongswan-1bc0b4f7959ca4ddb2af0715599e3a177a6e2f01.tar.bz2 strongswan-1bc0b4f7959ca4ddb2af0715599e3a177a6e2f01.tar.xz |
remove incomplete SAs with PROTO_ESP
Diffstat (limited to 'src/charon')
-rw-r--r-- | src/charon/sa/child_sa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/charon/sa/child_sa.c b/src/charon/sa/child_sa.c index 14d174ab5..28c513683 100644 --- a/src/charon/sa/child_sa.c +++ b/src/charon/sa/child_sa.c @@ -819,6 +819,12 @@ static void destroy(private_child_sa_t *this) /* delete SAs in the kernel, if they are set up */ if (this->my_spi) { + /* if CHILD was not established, use PROTO_ESP used during alloc_spi(). + * TODO: For AH support, we have to store protocol specific SPI.s */ + if (this->protocol == PROTO_NONE) + { + this->protocol = PROTO_ESP; + } charon->kernel_interface->del_sa(charon->kernel_interface, this->other_addr, this->my_addr, this->my_spi, this->protocol, this->my_cpi); |