summaryrefslogtreecommitdiffstats
path: root/sys/netipsec
diff options
context:
space:
mode:
authorfabient <fabient@FreeBSD.org>2011-03-31 13:14:24 +0000
committerfabient <fabient@FreeBSD.org>2011-03-31 13:14:24 +0000
commit9f3325218f52c56e8f7bb7ab7fff2aa7c2363d63 (patch)
tree7a0004a5dc27916469c5f70db0efcc5b30ff8fc6 /sys/netipsec
parentf0f627912160efe3edaa7b98ce041ec912be1c36 (diff)
downloadFreeBSD-src-9f3325218f52c56e8f7bb7ab7fff2aa7c2363d63.zip
FreeBSD-src-9f3325218f52c56e8f7bb7ab7fff2aa7c2363d63.tar.gz
Fix two SA refcount:
- AH does not release the SA like in ESP/IPCOMP when handling EAGAIN - ipsec_process_done incorrectly release the SA. Reviewed by: vanhu MFC after: 1 week
Diffstat (limited to 'sys/netipsec')
-rw-r--r--sys/netipsec/ipsec_output.c1
-rw-r--r--sys/netipsec/xform_ah.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index 0907f45..7c21d83 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -247,7 +247,6 @@ ipsec_process_done(struct mbuf *m, struct ipsecrequest *isr)
panic("ipsec_process_done");
bad:
m_freem(m);
- KEY_FREESAV(&sav);
return (error);
}
diff --git a/sys/netipsec/xform_ah.c b/sys/netipsec/xform_ah.c
index 5701f90..6a2d351 100644
--- a/sys/netipsec/xform_ah.c
+++ b/sys/netipsec/xform_ah.c
@@ -785,6 +785,7 @@ ah_input_cb(struct cryptop *crp)
sav->tdb_cryptoid = crp->crp_sid;
if (crp->crp_etype == EAGAIN) {
+ KEY_FREESAV(&sav);
error = crypto_dispatch(crp);
return error;
}
OpenPOWER on IntegriCloud