Skip to content

Commit fad4a88

Browse files
martin-gpyigaw
authored andcommitted
fabrics: add error if no dhchap-secret is specified with --concat
--concat requires a corresponding dhchap-secret key to be passed with it. So add an appropriate error message if this is not done. Signed-off-by: Martin George <[email protected]> (cherry picked from 62a3ec111d5d) Signed-off-by: Daniel Wagner <[email protected]>
1 parent 1969824 commit fad4a88

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
@@ -632,6 +632,11 @@ static int build_options(nvme_host_t h, nvme_ctrl_t c, char **argstr)
632632
return -ENVME_CONNECT_INVAL;
633633
}
634634

635+
if (cfg->concat && !hostkey) {
636+
nvme_msg(h->r, LOG_ERR, "required argument [--dhchap-secret | -S] not specified with --concat\n");
637+
return -ENVME_CONNECT_INVAL;
638+
}
639+
635640
if (cfg->tls) {
636641
ret = __nvme_import_keys_from_config(h, c, &keyring_id, &key_id);
637642
if (ret) {

0 commit comments

Comments
 (0)