Skip to content

Commit 9473d9a

Browse files
committed
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 c31a813 commit 9473d9a

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
@@ -1677,10 +1677,9 @@ static void nvme_read_sysfs_tls(struct nvme_global_ctx *ctx, nvme_ctrl_t c)
16771677

16781678
key = nvme_get_ctrl_attr(c, "tls_key");
16791679
if (!key) {
1680-
/* tls_key is only present if --tls has been used. */
1680+
/* tls_key is only present if --tls or --concat has been used */
16811681
return;
16821682
}
1683-
c->cfg.tls = true;
16841683

16851684
keyring = nvme_get_ctrl_attr(c, "tls_keyring");
16861685
nvme_ctrl_set_keyring(c, keyring);

0 commit comments

Comments
 (0)