diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-06-25 23:59:16 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2020-06-25 23:59:16 +0000 |
commit | dae61c9d09a79fc93c9486c212a586512339e6a0 (patch) | |
tree | 1545d554f406b443890e7ce49371fdce2655e095 /sys/netipsec/xform_ipcomp.c | |
parent | f82eb2a6f04c2a4193378f932fe8ab9b84fbb67d (diff) | |
download | src-dae61c9d09a79fc93c9486c212a586512339e6a0.tar.gz src-dae61c9d09a79fc93c9486c212a586512339e6a0.zip |
Simplify IPsec transform-specific teardown.
- Rename from the teardown callback from 'zeroize' to 'cleanup' since
this no longer zeroes keys.
- Change the callback return type to void. Nothing checked the return
value and it was always zero.
- Don't have esp call into ah since it no longer needs to depend on
this to clear the auth key. Instead, both are now private and
self-contained.
Reviewed by: delphij
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25443
Notes
Notes:
svn path=/head/; revision=362636
Diffstat (limited to 'sys/netipsec/xform_ipcomp.c')
-rw-r--r-- | sys/netipsec/xform_ipcomp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netipsec/xform_ipcomp.c b/sys/netipsec/xform_ipcomp.c index 0949062f4395..b9dfe0e3532f 100644 --- a/sys/netipsec/xform_ipcomp.c +++ b/sys/netipsec/xform_ipcomp.c @@ -179,15 +179,14 @@ ipcomp_init(struct secasvar *sav, struct xformsw *xsp) } /* - * ipcomp_zeroize() used when IPCA is deleted + * ipcomp_cleanup() used when IPCA is deleted */ -static int -ipcomp_zeroize(struct secasvar *sav) +static void +ipcomp_cleanup(struct secasvar *sav) { crypto_freesession(sav->tdb_cryptoid); sav->tdb_cryptoid = NULL; - return 0; } /* @@ -739,7 +738,7 @@ static struct xformsw ipcomp_xformsw = { .xf_type = XF_IPCOMP, .xf_name = "IPcomp", .xf_init = ipcomp_init, - .xf_zeroize = ipcomp_zeroize, + .xf_cleanup = ipcomp_cleanup, .xf_input = ipcomp_input, .xf_output = ipcomp_output, }; |