Skip to content

Commit 9c61b78

Browse files
martin-gpyigaw
authored andcommitted
tree: avoid updating --tls in nvme_read_sysfs_tls()
It is wrongly assumed that the presence of the sysfs tls_key attribute indicates --tls alone was invoked. But this can also happen if --concat was invoked as well. And both --tls and --concat are mutually exclusive. Also, both --tls and --concat are already appropriately set earlier during configured & generated PSK TLS workflows respectively. So avoid explicitly setting --tls again here in nvme_read_sysfs_tls() as that's unnecessary and incorrect too. Signed-off-by: Martin George <[email protected]>
1 parent f1224d0 commit 9c61b78

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

libnvme/src/nvme/tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,10 +1702,9 @@ static void nvme_read_sysfs_tls(struct nvme_global_ctx *ctx, nvme_ctrl_t c)
17021702

17031703
key = nvme_get_ctrl_attr(c, "tls_key");
17041704
if (!key) {
1705-
/* tls_key is only present if --tls has been used. */
1705+
/* tls_key is only present if --tls or --concat has been used */
17061706
return;
17071707
}
1708-
c->cfg.tls = true;
17091708

17101709
keyring = nvme_get_ctrl_attr(c, "tls_keyring");
17111710
nvme_ctrl_set_keyring(c, keyring);

0 commit comments

Comments
 (0)