Skip to content

Commit 1969824

Browse files
martin-gpyigaw
authored andcommitted
fabrics: add error if --tls and --concat are invoked together
--tls and --concat are mutually exclusive and not meant to be invoked together. So add an appropriate error message for the same. Signed-off-by: Martin George <[email protected]> (cherry picked from 75cfffcdf892) Signed-off-by: Daniel Wagner <[email protected]>
1 parent dc3fa78 commit 1969824

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/nvme/fabrics.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,11 @@ static int build_options(nvme_host_t h, nvme_ctrl_t c, char **argstr)
627627

628628
ctrlkey = nvme_ctrl_get_dhchap_key(c);
629629

630+
if (cfg->tls && cfg->concat) {
631+
nvme_msg(h->r, LOG_ERR, "cannot specify --tls and --concat together\n");
632+
return -ENVME_CONNECT_INVAL;
633+
}
634+
630635
if (cfg->tls) {
631636
ret = __nvme_import_keys_from_config(h, c, &keyring_id, &key_id);
632637
if (ret) {

0 commit comments

Comments
 (0)