mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
cxgbe: Handle requests for TLS key allocations with no TLS key storage.
If an adapter advertises support for TLS keys but an empty TLS key storage area in on-board memory, fail the request rather than invoking vmem_alloc on an uninitialized vmem. Sponsored by: Chelsio Communications
This commit is contained in:
parent
bbb2f53715
commit
1ca4f45ea8
1 changed files with 3 additions and 0 deletions
|
|
@ -640,6 +640,9 @@ t4_alloc_tls_keyid(struct adapter *sc)
|
|||
{
|
||||
vmem_addr_t addr;
|
||||
|
||||
if (sc->vres.key.size == 0)
|
||||
return (-1);
|
||||
|
||||
if (vmem_alloc(sc->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT,
|
||||
&addr) != 0)
|
||||
return (-1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue