From nobody Wed Jan 21 19:50:15 2026 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 4dxFCq5tjhz6Pdln for ; Wed, 21 Jan 2026 19:50:15 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dxFCq4Z5Qz3HGF for ; Wed, 21 Jan 2026 19:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769025015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GfPMEseabg+H+lg8drahajKfT18bQOw62rHthY15/g=; b=WvVgAdyc1Vo8bxgFmTGWt2pt/S5x8mCspWv9rHB6ZMzvqEkaYDnnjErzQjjwXGO7ErORvK tp+P152YXp1/rN/8u+ym/S7XaFV/QyDdJQck523Gj9xSTMBoD8G8668uumAMuD1P4YLg6Y IBUc8JVZjZ5V72LD0oYlvnnIJ5Bq4pZzKVVnB0GXGKKM76sWqxFz1LoqnDwA2D3QXYqZ5G paA0YzNeQpbrlAJabPMuX4F9VTI2M0PC/Xz3Knj5gz49R+2+gRgCPmlC66SfOsQzi65RD2 8t6nxLcSVC7TbOtgmShdbX0lBtAvAN7TZD8UsjccugCDfUflFXb3w1yxlMwFeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769025015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7GfPMEseabg+H+lg8drahajKfT18bQOw62rHthY15/g=; b=RH8ZnX4PRVcWrPmMbhMoO/tEKyNB2sPST1+8TLCUaJnFiv3GBhzSuXLG7zrRMaw0fh5ZF3 yfn/jjm/0Bp+44wShtvv7oGn7gMianKg1bm32wyEEiceI7vIatSj9y0XQz2ljsuN9qQsGj PDF75KLXL0Q9pAamEtDJ2kH0NVBc5wnVjrceJaAOZ5B48eXnZnDTV2Glngnw2JKQptLQX9 SceAkf10xaYTN3JoXvEasrG52q36OU1MFuQCwDk4yr0FiKmqw+vlgT+fS6ZLCz9n+0RTfR U1iDCaJWqy8w9tlEhZy7g6nC7HJQQ4SCXJ0Bc8Lx+GoubE8PfH053KGYts7GoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769025015; a=rsa-sha256; cv=none; b=NhpX29/+A9gcJ3VtWskkUqrQb4M6w+LiQhtLDcrd/Jr29g6ut2A4eNwCuqhtWhIfNkLU5x 9msJRZd4nZmklmnoQgGN3KCXxVeDPKiRj4w8lweHhXC80Kv+3w2w2ygTCEfmGUV4RTTZlP PHXIcg08cdydImjG+nZ8lo4SsiHDY+7+8VjDkreqyMWjlKNRW11jnkN32Z6vAaxU8P78Yf CFTwPKy6d3OhRgGKaPRVydzxUCSj83g9+CWAO6yxvOu9sRE9bZTjb59ih6SoXmp+aQc3uO RMYpe0oWML8a52TZqZjYwG6tPaHErICzi060k+qoTARbTVpbXG128T9BFUxXcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dxFCq40xXz11Yr for ; Wed, 21 Jan 2026 19:50:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id bd5f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 21 Jan 2026 19:50:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: ba49ad50c0b9 - stable/15 - tcp: fix checksum calculation bug 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ba49ad50c0b92dfc2efd97d45bb6e2931dd9aaa3 Auto-Submitted: auto-generated Date: Wed, 21 Jan 2026 19:50:15 +0000 Message-Id: <69712df7.bd5f.494c49ea@gitrepo.freebsd.org> The branch stable/15 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ba49ad50c0b92dfc2efd97d45bb6e2931dd9aaa3 commit ba49ad50c0b92dfc2efd97d45bb6e2931dd9aaa3 Author: Timo Völker AuthorDate: 2025-12-19 16:50:20 +0000 Commit: Michael Tuexen CommitDate: 2026-01-21 19:49:46 +0000 tcp: fix checksum calculation bug The new function in_delayed_cksum_o() was introduced to compute the checksum in the case the mbuf chain does not start with the IP header. The offset of the IP header is specified by the parameter iph_offset. If iph_offset was positive, the function computed an incorrect checksum. Reviewed by: sobomax, tuexen Fixes: 5feb38e37847 ("netinet: provide "at offset" variant of the in_delayed_cksum() API") Differential Revision: https://reviews.freebsd.org/D54269 (cherry picked from commit c8b3b605ae854ead6c8804e0400d80cb8fa73fdf) --- sys/netinet/ip_output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index ef08b9cfd3d6..bd87e9f2d6a6 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1067,8 +1067,8 @@ in_delayed_cksum_o(struct mbuf *m, uint16_t iph_offset) if (csum == 0) csum = 0xffff; } else { - cklen = ntohs(ip->ip_len); - csum = in_cksum_skip(m, cklen, offset); + cklen = ntohs(ip->ip_len) - (ip->ip_hl << 2); + csum = in_cksum_skip(m, cklen + offset, offset); } offset += m->m_pkthdr.csum_data; /* checksum offset */