Re: [PATCH] nvme-auth: Don't propose NVME_AUTH_DHGROUP_NULL with SC_C
From: Christoph Hellwig
Date: Fri Mar 06 2026 - 09:54:46 EST
On Fri, Mar 06, 2026 at 02:18:06PM +1000, alistair23@xxxxxxxxx wrote:
> + u8 dh_list_offset = 30;
Can you add a symbolic name for this while we're at it and reuse it for
the dhchap.dhlen assignment.
> + if (chap->sc_c == NVME_AUTH_SECP_NOSC)
> + data->auth_protocol[0].dhchap.idlist[dh_list_offset++] = NVME_AUTH_DHGROUP_NULL;
> + data->auth_protocol[0].dhchap.idlist[dh_list_offset++] = NVME_AUTH_DHGROUP_2048;
And please add a local variable pointing data->auth_protocol[0].dhchap.idlist
to make this somewhat readable.