From nobody Wed May 11 21:04:35 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 706481AE640C; Wed, 11 May 2022 21:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kz6q827tsz4vlH; Wed, 11 May 2022 21:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652303076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/X65XLVhNHiL993un8JKu18ArAT3PVYkvLCIySJC/OE=; b=sNX4Lqv9iuac/gf6y9lcorAfgy/kpPxzcaRexcAcev5QBaeAA7aKlBVgJJ+/g1eaSw4rJm E39haI4L4YWeRpru2JMqKJjqiMMBFiagtDOuL9gECYDEJnTN6VmorhSm3WNhVP62KO4IDV FXIkFa11y0ia4eyAWyEm1aPzHtwEPgDjWm+KQd+aH8q4ex0l0kc7763aZBrucARt7hwL5U pEKxCEMArA98YeFd8R4uvnvvlAAcwG/gi7c92DtymAx2LJthtJ7uwhrqy+AjMOpBe9Ghrp vtTNaewY/bpLHNaJywKTv/mGLVkmndOQU/3pdsdKJeK25FeFQdhCaJ8kQtLopQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1825420FD2; Wed, 11 May 2022 21:04:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24BL4ZQL025662; Wed, 11 May 2022 21:04:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24BL4ZOY025661; Wed, 11 May 2022 21:04:35 GMT (envelope-from git) Date: Wed, 11 May 2022 21:04:35 GMT Message-Id: <202205112104.24BL4ZOY025661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 08b090d767eb - stable/13 - iser: Fix check for opcodes in iser_conn_pdu_append_data. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 08b090d767eb44a1e80f56e302f1613dc4a42f25 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652303076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/X65XLVhNHiL993un8JKu18ArAT3PVYkvLCIySJC/OE=; b=sSNu8byMc10A3QqrKbci88vA44K364kzJZlYqaxP/o9ZLFv1ydYaLIaJ3/c9pDti2B8ZSZ koKthTbiG/BV8ZUqvybpbg2HOewXOoUpUdpGn4mEQ5DwSMKgSFTeBS1Zm40+2yh6njCtEs QhrcbjP+J6hMuThBT0+nq+sNlkeFvH36X6D9d25fXUOuCEMM0fONmt+JyPB8j/wtnbXsgf mTY7fSin+M7oQHnuF5IPPVBLFoN1ySuCRQwKplnuovAKWvf6/ILBHYNP8lIKukaTN6ttNH 89oe6ZO8YP1tOROjLEb+JHofS7BQ4yU78KlTo3tr+3DYT019QUyNCNRWAmcuiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652303076; a=rsa-sha256; cv=none; b=k5qgFi7USVQTULMX/bikRZPqbZW5VnRz4zdA+xO4EG9VAhz6jLgNOHber5/Qww1RvrRlLp Mg0zsu0uZ7SJGzMH6e3AXWXVJJz1OPDGhXukdzmAruUUEfdHutXIeTrstxYdLBdWBZdUJm dKqhMlY6GfHzFmVnmRtdpBTWGfmagO1Yqf9IJbdRWlS6Z0XHh5X/aEl655nJRl5HsVwbZO p01HgTH0yomhCYll65nFIChO5ARXcwiNJ7Ky6qyXi89spM3p3UQqEeIZs4qNGnzOCC39/e KEI4gjmAMQMTKm0FYoBC3KE0Y2/VqfSE7yXkIKKMahIEuM6+N691SD7fMdVwAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=08b090d767eb44a1e80f56e302f1613dc4a42f25 commit 08b090d767eb44a1e80f56e302f1613dc4a42f25 Author: John Baldwin AuthorDate: 2022-03-10 23:49:37 +0000 Commit: John Baldwin CommitDate: 2022-05-11 20:50:40 +0000 iser: Fix check for opcodes in iser_conn_pdu_append_data. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34487 (cherry picked from commit c6a43f7f10b183469c3804cfb31b29b6d938621b) --- sys/dev/iser/icl_iser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/iser/icl_iser.c b/sys/dev/iser/icl_iser.c index f3780a441e01..2c2514a1422b 100644 --- a/sys/dev/iser/icl_iser.c +++ b/sys/dev/iser/icl_iser.c @@ -114,11 +114,13 @@ iser_conn_pdu_append_data(struct icl_conn *ic, struct icl_pdu *request, { struct iser_conn *iser_conn = icl_to_iser_conn(ic); - if (request->ip_bhs->bhs_opcode & ISCSI_BHS_OPCODE_LOGIN_REQUEST || - request->ip_bhs->bhs_opcode & ISCSI_BHS_OPCODE_TEXT_REQUEST) { + switch (request->ip_bhs->bhs_opcode & ISCSI_OPCODE_MASK) { + case ISCSI_BHS_OPCODE_LOGIN_REQUEST: + case ISCSI_BHS_OPCODE_TEXT_REQUEST: ISER_DBG("copy to login buff"); memcpy(iser_conn->login_req_buf, addr, len); request->ip_data_len = len; + break; } return (0);