mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
ktls: Check for a NULL send tag in ktls_cleanup()
When using ifnet ktls, and when ktls_reset_send_tag() fails to allocate a replacement tag, it leaves the tls session's snd_tag pointer NULL. ktls_cleanup() tries to release the send tag, and will trip over this NULL pointer and panic unless NULL is checked for. Reviewed by: jhb Sponsored by: Netflix
This commit is contained in:
parent
cb55665190
commit
9675d8895a
1 changed files with 2 additions and 1 deletions
|
|
@ -680,7 +680,8 @@ ktls_cleanup(struct ktls_session *tls)
|
|||
counter_u64_add(ktls_ifnet_gcm, -1);
|
||||
break;
|
||||
}
|
||||
m_snd_tag_rele(tls->snd_tag);
|
||||
if (tls->snd_tag != NULL)
|
||||
m_snd_tag_rele(tls->snd_tag);
|
||||
break;
|
||||
#ifdef TCP_OFFLOAD
|
||||
case TCP_TLS_MODE_TOE:
|
||||
|
|
|
|||
Loading…
Reference in a new issue