Skip to content

Commit dc3fa78

Browse files
martin-gpyigaw
authored andcommitted
fabrics: fix concat during nvme connect-all
During nvme connect-all, if a discovery log page record reports the sectype as anything other than NVMF_TCP_SECTYPE_NONE in nvmf_connect_disc_entry(), it then assumes that --tls should be default set for the same. But this holds true only for configured PSK TLS alone and not for generated PSK TLS. For generated PSK TLS connections using --concat (i.e. secure channel concat), this would lead to connection failures since both --tls and --concat are not to be invoked together. Fix this by distinguishing the two through their respective treq values and setting the appropriate --tls or --concat flags for each. Signed-off-by: Martin George <[email protected]> (cherry picked from commit 3f2ca96d77b1) Signed-off-by: Daniel Wagner <[email protected]>
1 parent d65b44c commit dc3fa78

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/nvme/fabrics.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,12 @@ nvme_ctrl_t nvmf_connect_disc_entry(nvme_host_t h,
11001100
c->cfg.disable_sqflow = true;
11011101

11021102
if (e->trtype == NVMF_TRTYPE_TCP &&
1103-
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE)
1104-
c->cfg.tls = true;
1103+
e->tsas.tcp.sectype != NVMF_TCP_SECTYPE_NONE) {
1104+
if (e->treq & NVMF_TREQ_REQUIRED)
1105+
c->cfg.tls = true;
1106+
else if (e->treq & NVMF_TREQ_NOT_REQUIRED)
1107+
c->cfg.concat = true;
1108+
}
11051109

11061110
ret = nvmf_add_ctrl(h, c, cfg);
11071111
if (!ret)

0 commit comments

Comments
 (0)