git: f63ddf465fe0 - main - cxgbei: Only convert "plain" TCP connections to ISCSI.
John Baldwin
jhb at FreeBSD.org
Mon Sep 13 17:04:17 UTC 2021
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=f63ddf465fe09d3547deaf80fbdb91bc7b816dfb
commit f63ddf465fe09d3547deaf80fbdb91bc7b816dfb
Author: John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-09-13 16:57:54 +0000
Commit: John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-09-13 16:57:54 +0000
cxgbei: Only convert "plain" TCP connections to ISCSI.
Reject attempts to convert a connection using a different ULP
mode: (e.g. DDP or TLS) to ISCSI.
Reported by: Jithesh Arakkan @ Chelsio
Sponsored by: Chelsio Communications
---
sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
index 6bec1f812cc0..cf1032f2a3a2 100644
--- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -870,6 +870,12 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd)
MPASS(tp->t_toe != NULL);
toep = tp->t_toe;
MPASS(toep->vi->adapter == icc->sc);
+
+ if (ulp_mode(toep) != ULP_MODE_NONE) {
+ INP_WUNLOCK(inp);
+ return (EINVAL);
+ }
+
icc->toep = toep;
icc->cwt = cxgbei_select_worker_thread(icc);
@@ -887,7 +893,6 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd)
} else
max_iso_pdus = 1;
- so->so_options |= SO_NO_DDP;
toep->params.ulp_mode = ULP_MODE_ISCSI;
toep->ulpcb = icc;
More information about the dev-commits-src-main
mailing list