Skip to content

Commit 6ff1bd7

Browse files
martin-gpykeithbusch
authored andcommitted
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: e88a759 ("nvme-tcp: request secure channel concatenation") Signed-off-by: Martin George <marting@netapp.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent 34585dc commit 6ff1bd7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/nvme/host/auth.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,10 @@ static int nvme_auth_set_dhchap_reply_data(struct nvme_ctrl *ctrl,
331331
} else {
332332
memset(chap->c2, 0, chap->hash_len);
333333
}
334-
if (ctrl->opts->concat)
334+
if (ctrl->opts->concat) {
335335
chap->s2 = 0;
336-
else
336+
chap->bi_directional = false;
337+
} else
337338
chap->s2 = nvme_auth_get_seqnum();
338339
data->seqnum = cpu_to_le32(chap->s2);
339340
if (chap->host_key_len) {

0 commit comments

Comments
 (0)