Skip to content

Commit 45bf8e8

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]> (cherry picked from f1818da3448f) Signed-off-by: Daniel Wagner <[email protected]>
1 parent e485d28 commit 45bf8e8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/nvme/tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,10 +2013,9 @@ static void nvme_read_sysfs_tls(nvme_root_t r, nvme_ctrl_t c)
20132013

20142014
key = nvme_get_ctrl_attr(c, "tls_key");
20152015
if (!key) {
2016-
/* tls_key is only present if --tls has been used. */
2016+
/* tls_key is only present if --tls or --concat has been used */
20172017
return;
20182018
}
2019-
c->cfg.tls = true;
20202019

20212020
keyring = nvme_get_ctrl_attr(c, "tls_keyring");
20222021
nvme_ctrl_set_keyring(c, keyring);

0 commit comments

Comments
 (0)