[PATCH] nvme-auth: Don't propose NVME_AUTH_DHGROUP_NULL with SC_C

Christoph Hellwig hch at lst.de
Fri Mar 6 06:54:09 PST 2026


On Fri, Mar 06, 2026 at 02:18:06PM +1000, alistair23 at gmail.com 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.




More information about the Linux-nvme mailing list