From nobody Fri Nov 13 19:33:15 2026 X-Original-To: dev-commits-src-all@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 4jR6qb60BHz718Tv for ; Fri, 13 Nov 2026 19:33: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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jR6qb1QjVz4fBd for ; Fri, 13 Nov 2026 19:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794598395; 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=rSfDrMQivwuTw9VfeB+j4tE9XHJmPFG+qpfpJlB7Zoo=; b=ezuijFcxEkOfJPboh5jbkgdCgv4xt0eApa+BM9YzsShgMGFNhzioWd9kU+8IsRqw0eLI7h kw8UH0wJHAf1t+ygEr8pVkaeDgZdsrqVcvm6g4nclbw/ox5pHuAQZzHcm8ch5JA9mEBWmf BikXomXgdsi64mm7UZiYXu0q4HmWqDqahDVltuqw0F651+PjBjMoEkButNMQusJxZmlNwa aVb9+6n/22etrUMnow2XtfXy7i0d25hSp0mBrSVcOAHRiHu7x/65zoOm57XtQUv4h7uPyE itW0o2g9eshCaCzeHQBxdgGmY59V4h9U2/mA+2a+S7F6at0JAoj2IhptVYmpfA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794598395; b=SovfX6zN8HOfPXvMdFFuSsnAjAB8HUwtqxXFKVOrLuWkKUU35ZxzDKMNtDo5a468fMV3eV PWOdrCwxWgGbGLFYc9MDxc0LilH2VSvxr2qnBhhd7DPTUHm6PawDV8QHDN00gVdg5fCG6M 3gOGewi2iHBttir4M0nsD4mE306E+gEqrLwTLX0c0l1E9xIjGx7PpG/qlA/S7q1xQUYnHV LWFynpbIKvfCZ+i5VccSLdZ5o3Iz0HSXijdtH+dVhfW+fz19ojvhCrRES8FCC/9jOgv0vv WFGf4G5d4rlVuoKE2ou5wh7vXfqo7hmACxVa8Ac6XxAlX4xeSPTU2WNd7mNT3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794598395; 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=rSfDrMQivwuTw9VfeB+j4tE9XHJmPFG+qpfpJlB7Zoo=; b=rNPZ177Di5oqOfnLKdoe7OUt+1PfMWtznKHjn3SSR6dbJy4OX6LJkCveBIy93FRwHZj8FS Nr34Nnb2oJ647VxXBvpM3rpGIRW9LRJTcJ32ke9wbmtox7DuoyQ1AsfQ4bg4+H7Y78UPyl rtMBNE6ZPoSGpc3y9YurnhcOMNc3LmCjXUflD40GXV2AMTcvw/88jW/VYjmw4zZSH2mfoS slH7yfEr9HR0+MOZKwWwLy9GgjGiDK5itxyjestf87i1GO6vFg9TXG5OKDTedLdObNX0rV iQ8NVwMl+vQmVmYkBCSGn2knLjBiDWR6S2F49IQjGNMXnclwW0UQ+VuvmzCVxQ== 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 4jR6qb0ghszq5g for ; Fri, 13 Nov 2026 19:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24f35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 19:33:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 21c2318d667f - stable/14 - ipfilter: Remove erroneous ntohs() List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 21c2318d667fea7ed8c7a2e4ae9bafa5409ee8c1 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 19:33:15 +0000 Message-Id: <6af765fb.24f35.1199bccb@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=21c2318d667fea7ed8c7a2e4ae9bafa5409ee8c1 commit 21c2318d667fea7ed8c7a2e4ae9bafa5409ee8c1 Author: Cy Schubert AuthorDate: 2026-11-09 23:13:21 +0000 Commit: Cy Schubert CommitDate: 2026-11-13 19:33:05 +0000 ipfilter: Remove erroneous ntohs() The original commit was wrong. ipf_nat_builddivertmp() builds the UDP template with the length in host byte order M_DUP() copies that value unchanged. The old code was therefore correct. It added fin_plen in host order and then did a single htons(). The original patch was discussed with Co-Pilot, which pointed out the original bug. claude-opus-5-5 discovered the ntohs() error that co-pilot suggested. Interestingly this code had been running here for a couple of months. Reported by: llm-postcr Fixes: 72cc9e3766f4 (cherry picked from commit 86861520613f99c85b5fbdf92b5c955a13ed6624) --- sys/netpfil/ipfilter/netinet/ip_nat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 8e6c3107c782..311968746c10 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -5160,7 +5160,6 @@ ipf_nat_out(fr_info_t *fin, nat_t *nat, int natadd, u_32_t nflags) if (ip->ip_p == IPPROTO_UDP) { uh = (udphdr_t *)(ip + 1); - uh->uh_ulen = ntohs(uh->uh_ulen); uh->uh_ulen += fin->fin_plen; uh->uh_ulen = htons(uh->uh_ulen); }