From nobody Fri Nov 13 19:32:51 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 4jR6q80fq1z7189C for ; Fri, 13 Nov 2026 19:32:52 +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 4jR6q754zVz4dgT for ; Fri, 13 Nov 2026 19:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794598371; 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=BO+J5ktmHsMwE6b0ot0mphBLOAW2BxO6+2NA1W8xHL0=; b=FX0yXeFLIsVrq2p9d3mBmImcPEW3lXvLvviHeGC/ea9DzYjcx7QEu3ILRuL5jwEly0YCbP 6g1pM4vrN/Fe/siMtuhhQdAEwFdPkXN4IqyJnagLsBIyNWW0o1oFHr8kWkd5IBt6QEG7IA UJbR3oHbAMwUxgTLO+m6KActZR/rHLNJYOkCRAOkv5ASZDn1Yxxw8vDb+Ai+a7fJWeEB2S 0dFq2t/mpkrZ3rqVI4i/dlKY3qCZ5wIsaprHQe4JoG6gjzHIHhZ6Myk133gun35GN7oyRt mczGzmwsvWXe51PIxfgsTwht6BPgmB8t2oG8ge3ULjlpqAINnjMRAFuT1Hf5lg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794598371; b=effZkGnmuQ7sRe22NNn+kRNp2898wQlY7E7JXfaeVXAK1EBL6iLYjc3f0J6wCtfPTHv8Kn 8I3reQwTt0b6vlEJJk82pVxWjs/89MpdAOtd+UBe5DuzYFU1VJq1uZQHDRiaBikAhviQKc TCTZarDs//RUY4UWarVwdIFVXblX7J/Ctf+3OeVTvoqi/yRRtJ448wiFNXhQfz1a2z2iIT cyy5SYlscxN0oleM0bGz44T2NQi1lvh2Q41wpkGQGZeZTZFt/LIsEywo+XdsceeMJ7axph i066ZR7XIhoH3UqV4RRUC9bsZ/m3//3diuDLcNPNVfyOe3E6kWuQMUp5U6QEfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794598371; 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=BO+J5ktmHsMwE6b0ot0mphBLOAW2BxO6+2NA1W8xHL0=; b=YlxqXD6Dn3XZE0BF1rM744eFSLM3NYRHp/kC3UBjp1hYqNzE/KzTAJXOxFMORboILbjfAw 2WmSLSFnCjGESNS5Q2bRhAEXoOxAVxQnpZ7JLFcqFrgAR+RJjFkQ/uHglin9DBQ0PHz7I1 mdTBO8U/oNRv827FhnRZrrGDitcUk2GUlNREbekkP1S122uYnDIxD5B6/9NH85x5pD4hDW Fyxz7/dcoC+hrYAV5cSmk/xNayFEAoqiuG895idUO39s9xsYvKLNA6898REVCJqypOs4mX 05QHRhGF+GoVcH1S+Kl5tiipnjY7tYfZHe9m/kmvXck/o6CytQqYE+8dY1Vq5Q== 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 4jR6q741lpzpml for ; Fri, 13 Nov 2026 19:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 259ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 19:32:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: e6ad9d647a89 - stable/15 - 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/15 X-Git-Reftype: branch X-Git-Commit: e6ad9d647a890d71231949de3cd0c43acaf8ec83 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 19:32:51 +0000 Message-Id: <6af765e3.259ae.1aae3c8f@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e6ad9d647a890d71231949de3cd0c43acaf8ec83 commit e6ad9d647a890d71231949de3cd0c43acaf8ec83 Author: Cy Schubert AuthorDate: 2026-11-09 23:13:21 +0000 Commit: Cy Schubert CommitDate: 2026-11-13 19:32:36 +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 c8125c10e3f0..4b4890587f53 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -5156,7 +5156,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); }