nvme-auth: always set valid seq_num in dhchap reply
authorMark O'Donovan <shiftee@posteo.net>
Wed, 25 Oct 2023 10:51:25 +0000 (10:51 +0000)
committerKeith Busch <kbusch@kernel.org>
Mon, 6 Nov 2023 16:34:20 +0000 (08:34 -0800)
commit6f66d046eade7a5b979e349ac52026ddfe2776b3
treea42ceaa1ce98c46079fcdb3b4b5b4c76881d0836
parentfc1e03eacac8e5ff8664ce2ebadabba8604f09f4
nvme-auth: always set valid seq_num in dhchap reply

Currently a seqnum of zero is sent during uni-directional
authentication. The zero value is reserved for the secure channel
feature which is not yet implemented.

Relevant extract from the spec:
The value 0h is used to indicate that bidirectional authentication
is not performed, but a challenge value C2 is carried in order to
generate a pre-shared key (PSK) for subsequent establishment of a
secure channel

Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/nvme/host/auth.c
drivers/nvme/target/fabrics-cmd-auth.c