diff options
author | Martin Willi <martin@revosec.ch> | 2013-10-11 10:24:27 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2013-10-11 10:25:35 +0200 |
commit | 11282d0054d8a51f184a6f726f7f180ccf60e456 (patch) | |
tree | 8d7cceebfa783449fbe3d164cb0cdd5c3e2cafcc /src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c | |
parent | b59bcba2b38dda5f0f6301b7ae90acc58b4a069b (diff) | |
parent | d53002f088c588bb65215bb9a6e5100ba321738e (diff) | |
download | strongswan-11282d0054d8a51f184a6f726f7f180ccf60e456.tar.bz2 strongswan-11282d0054d8a51f184a6f726f7f180ccf60e456.tar.xz |
Merge branch 'libipsec-usestats'
Brings SA usage statistics and volume based expiration to libipsec and the
associated kernel-libipsec plugin. Additionally removes any ESPv3 style TFC
padding found in incoming packets.
Diffstat (limited to 'src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c')
-rw-r--r-- | src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c b/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c index 40f253d5a..9d95aa7fd 100644 --- a/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c +++ b/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c @@ -226,7 +226,7 @@ static void expire(u_int32_t reqid, u_int8_t protocol, u_int32_t spi, bool hard) METHOD(kernel_ipsec_t, get_features, kernel_feature_t, private_kernel_libipsec_ipsec_t *this) { - return KERNEL_REQUIRE_UDP_ENCAPSULATION; + return KERNEL_REQUIRE_UDP_ENCAPSULATION | KERNEL_ESP_V3_TFC; } METHOD(kernel_ipsec_t, get_spi, status_t, @@ -268,9 +268,10 @@ METHOD(kernel_ipsec_t, update_sa, status_t, METHOD(kernel_ipsec_t, query_sa, status_t, private_kernel_libipsec_ipsec_t *this, host_t *src, host_t *dst, u_int32_t spi, u_int8_t protocol, mark_t mark, u_int64_t *bytes, - u_int64_t *packets, u_int32_t *time) + u_int64_t *packets, time_t *time) { - return NOT_SUPPORTED; + return ipsec->sas->query_sa(ipsec->sas, src, dst, spi, protocol, mark, + bytes, packets, time); } METHOD(kernel_ipsec_t, del_sa, status_t, @@ -555,7 +556,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t, METHOD(kernel_ipsec_t, query_policy, status_t, private_kernel_libipsec_ipsec_t *this, traffic_selector_t *src_ts, traffic_selector_t *dst_ts, policy_dir_t direction, mark_t mark, - u_int32_t *use_time) + time_t *use_time) { return NOT_SUPPORTED; } |