From nobody Mon Jan 01 23:16:41 2024 X-Original-To: dev-commits-src-main@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 4T3sLf0FCKz55pyP; Mon, 1 Jan 2024 23:16:42 +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 4T3sLd5ss5z4ZST; Mon, 1 Jan 2024 23:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704151001; 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=vL4qdhul/vGFsSl2ImjQuDj+RBDZh9zUI9AGwCyqLIs=; b=w0d7/65ApCYdrmNCU32A7F7Dj+rucNL/x/qgWxu4C9nkZD3KzYjw/X5GzlRJBd1o2ypsC4 PePoymCgdMIlsuw0mB7a37yHSpsnhKGYec3Fb8qHiIDbUMp9v8LhhpbkQaFJsHGf5GAH+W 1u7kP8kWkP2LcjJQawCjAHi5UpIX9v0HdDsPrxI40HSUCxLwsWEVkX5aC+q4lJ0habLGuQ k17OAoK8ILhno1xWc/6z6zkwKuyKBrnF7xt6nRLcZAMHQIUL17DH1+Co4rYOtTne5PsjTB ayAPiDqAhFVypW7VBHLFGY0u2KpqNtfvca+7O/ziQiGBNRyrRgBvXKOIGK/oKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704151001; a=rsa-sha256; cv=none; b=tBMKRlwRnBpY5ZgB6EaPCsrexrhuf04mTtB5lUjOrLqvLIHPIajmwEBV3YiD83QjHzECfi AFI0iZUIy5FJJ0U8zPuHbXf5Dqzhb3ZmugvOe6BmBWEOX1MpU2kddbtkLtmJSIXW/eeN1o XV8PCYMB9Wq4/tGvGOlrDLQqHq3ojA8xBZ1TB2MNycmjswis59z1Fri8Xlvov0mUiduRuM lo+toUPH02gFMJi05FiRXGHkQWnu9sYI8QpiXUnEyDZsjlgj0Z1CQOPz/TAof3W/790ELq aS35mwYhaZtoFzYGuqZZuIHn5TOdEtd69onrSs5cnCkjP5E4jRFzJwKPshK1Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704151001; 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=vL4qdhul/vGFsSl2ImjQuDj+RBDZh9zUI9AGwCyqLIs=; b=swTHfSuwOquufFBPof3Fx9bclJ6c6oOGGnE9A6WJacDDroEEvtwWJVdj2BsyhNPxkVJHGX S9Vq1/p1awyDVf3AZGUb8pl7Aw3kSqdxzlGc+b9gqzFxP84duKaLy9p8Bpqu+VOOx8YIeY zk1lc3hx1Eun1DrDAhBdxJTmeQyJUCdIbwSXE6RAH5K1AOxyyQz53LqLEf0ipN8PCGM/Gp Z4VaoBs8UX3TJyWzES1bll5MuvG8xIgxYYxHLkP/JwsTA8xIG5yt31jXn9N2bx81h1Jdx2 nu9hLqVge1zxvi/MKMPcb5uyQAubRh5c0arlOv2qkQobBjvCz1N3LgtRrxJu8A== 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 4T3sLd4rKpzcpf; Mon, 1 Jan 2024 23:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 401NGfSc049981; Mon, 1 Jan 2024 23:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 401NGfvp049978; Mon, 1 Jan 2024 23:16:41 GMT (envelope-from git) Date: Mon, 1 Jan 2024 23:16:41 GMT Message-Id: <202401012316.401NGfvp049978@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c3268c23de45 - main - libdtrace: Fix TCP data offset handling in the tcpinfo_t translator List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3268c23de45b75b44102a02e96f44b0ff2f6ba7 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3268c23de45b75b44102a02e96f44b0ff2f6ba7 commit c3268c23de45b75b44102a02e96f44b0ff2f6ba7 Author: Mark Johnston AuthorDate: 2024-01-01 21:33:30 +0000 Commit: Mark Johnston CommitDate: 2024-01-01 23:03:54 +0000 libdtrace: Fix TCP data offset handling in the tcpinfo_t translator The header gives an offset in 32-bit words, and the translator is supposed to convert that to a byte count. But, the conversion was incorrect. Reviewed by: tuexen, rscheff MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43264 --- cddl/lib/libdtrace/tcp.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/tcp.d b/cddl/lib/libdtrace/tcp.d index a91f2cd2b0b4..0df4e16d41d0 100644 --- a/cddl/lib/libdtrace/tcp.d +++ b/cddl/lib/libdtrace/tcp.d @@ -265,7 +265,7 @@ translator tcpinfo_t < struct tcphdr *p > { tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); tcp_seq = p == NULL ? -1 : ntohl(p->th_seq); tcp_ack = p == NULL ? -1 : ntohl(p->th_ack); - tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_offset = p == NULL ? -1 : (p->th_off << 2); tcp_flags = p == NULL ? 0 : ((p->th_x2 << 8) | p->th_flags); tcp_window = p == NULL ? 0 : ntohs(p->th_win); tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum); @@ -284,7 +284,7 @@ translator tcpinfoh_t < struct tcphdr *p > { tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); tcp_seq = p == NULL ? -1 : p->th_seq; tcp_ack = p == NULL ? -1 : p->th_ack; - tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_offset = p == NULL ? -1 : (p->th_off << 2); tcp_flags = p == NULL ? 0 : ((p->th_x2 << 8) | p->th_flags); tcp_window = p == NULL ? 0 : p->th_win; tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum);