Skip to content

Commit c31a813

Browse files
committed
fabrics: update --tls and --concat in nbft_connect()
Both --tls & --concat are appropriately set in nvmf_connect_disc_entry() based on the respective sectype and treq values. Extend the same logic to nbft_connect() as well. Signed-off-by: Martin George <[email protected]>
1 parent fdcb92c commit c31a813

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

libnvme/src/nvme/fabrics.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,8 +2566,16 @@ static int nbft_connect(struct nvme_global_ctx *ctx,
25662566

25672567
if (e) {
25682568
if (e->trtype == NVMF_TRTYPE_TCP &&
2569-
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE)
2570-
cfg->tls = true;
2569+
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE) {
2570+
if (e->treq & NVMF_TREQ_REQUIRED) {
2571+
nvme_msg(ctx, LOG_DEBUG, "setting --tls due to treq %s and sectype %s\n",
2572+
nvmf_treq_str(e->treq), nvmf_sectype_str(e->tsas.tcp.sectype));
2573+
cfg->tls = true;
2574+
} else if (e->treq & NVMF_TREQ_NOT_REQUIRED) {
2575+
nvme_msg(ctx, LOG_DEBUG, "setting --concat due to treq %s and sectype %s\n",
2576+
nvmf_treq_str(e->treq), nvmf_sectype_str(e->tsas.tcp.sectype));
2577+
cfg->concat = true;
2578+
}
25712579
}
25722580

25732581
ret = nvmf_add_ctrl(h, c, cfg);

0 commit comments

Comments
 (0)