Skip to content

Commit cd4911e

Browse files
hreineckeigaw
authored andcommitted
fabrics: update dhchap options for discovery
Update dhchap key options when calling __create_discovery_ctrl(). Signed-off-by: Hannes Reinecke <[email protected]>
1 parent 3cc9a34 commit cd4911e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libnvme/src/nvme/fabrics.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,6 +2090,12 @@ static int __create_discovery_ctrl(struct nvme_global_ctx *ctx,
20902090
strcmp(trcfg->subsysnqn, NVME_DISC_SUBSYS_NAME));
20912091
tmo = set_discovery_kato(fctx, cfg);
20922092

2093+
if (fctx->hostkey) {
2094+
nvme_ctrl_set_dhchap_host_key(c, fctx->hostkey);
2095+
if (fctx->ctrlkey)
2096+
nvme_ctrl_set_dhchap_ctrl_key(c, fctx->ctrlkey);
2097+
}
2098+
20932099
ret = nvme_add_ctrl(fctx, h, c, cfg);
20942100
cfg->keep_alive_tmo = tmo;
20952101
if (ret) {

0 commit comments

Comments
 (0)