Commit 6ff1bd78 authored by Martin George's avatar Martin George Committed by Keith Busch
Browse files

nvme-auth: update bi_directional flag



While setting chap->s2 to zero as part of secure channel
concatenation, the host missed out to disable the bi_directional
flag to indicate that controller authentication is not requested.
Fix the same.

Fixes: e88a7595 ("nvme-tcp: request secure channel concatenation")
Signed-off-by: default avatarMartin George <marting@netapp.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 34585dc6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -331,9 +331,10 @@ static int nvme_auth_set_dhchap_reply_data(struct nvme_ctrl *ctrl,
	} else {
		memset(chap->c2, 0, chap->hash_len);
	}
	if (ctrl->opts->concat)
	if (ctrl->opts->concat) {
		chap->s2 = 0;
	else
		chap->bi_directional = false;
	} else
		chap->s2 = nvme_auth_get_seqnum();
	data->seqnum = cpu_to_le32(chap->s2);
	if (chap->host_key_len) {