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:
parent
e9e237190b
commit
11d2f4df50
@ -247,7 +247,6 @@ ipsec_process_done(struct mbuf *m, struct ipsecrequest *isr)
|
|||||||
panic("ipsec_process_done");
|
panic("ipsec_process_done");
|
||||||
bad:
|
bad:
|
||||||
m_freem(m);
|
m_freem(m);
|
||||||
KEY_FREESAV(&sav);
|
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -785,6 +785,7 @@ ah_input_cb(struct cryptop *crp)
|
|||||||
sav->tdb_cryptoid = crp->crp_sid;
|
sav->tdb_cryptoid = crp->crp_sid;
|
||||||
|
|
||||||
if (crp->crp_etype == EAGAIN) {
|
if (crp->crp_etype == EAGAIN) {
|
||||||
|
KEY_FREESAV(&sav);
|
||||||
error = crypto_dispatch(crp);
|
error = crypto_dispatch(crp);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user