charon-tkm: Claim to support SPIs on policies
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Jul 2017 11:49:21 +0000 (13:49 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 7 Aug 2017 08:44:05 +0000 (10:44 +0200)
This fixes rekeying as the delayed installation of the outbound SA
caused the nonce context to be expired already.

src/charon-tkm/src/tkm/tkm_kernel_ipsec.c

index c9be898..9229c3d 100644 (file)
@@ -52,6 +52,12 @@ struct private_tkm_kernel_ipsec_t {
 
 };
 
+METHOD(kernel_ipsec_t, get_features, kernel_feature_t,
+       private_tkm_kernel_ipsec_t *this)
+{
+       return KERNEL_POLICY_SPI;
+}
+
 METHOD(kernel_ipsec_t, get_spi, status_t,
        private_tkm_kernel_ipsec_t *this, host_t *src, host_t *dst,
        uint8_t protocol, uint32_t *spi)
@@ -358,6 +364,7 @@ tkm_kernel_ipsec_t *tkm_kernel_ipsec_create()
        INIT(this,
                .public = {
                        .interface = {
+                               .get_features = _get_features,
                                .get_spi = _get_spi,
                                .get_cpi = _get_cpi,
                                .add_sa  = _add_sa,