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
This commit is contained in:
Fabien Thomas 2011-03-31 13:14:24 +00:00
parent e9e237190b
commit 11d2f4df50
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220194
2 changed files with 1 additions and 1 deletions

View File

@ -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);
}

View File

@ -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;
}