From nobody Sat Jan 10 10:22:50 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 4dpF8B6JqQz6B0Gc for ; Sat, 10 Jan 2026 10:22:50 +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 4dpF8B3mh3z470x for ; Sat, 10 Jan 2026 10:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768040570; 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=AM3m7YNVv3PdfdBLav2gQiLfSNaEQ4yAx00DRp1li2w=; b=pyCwOX9OV1Wc5j7ZUHl8SwEJeIspsbu4N8yH0us9pwDvHSEoIZnPGwUns90abhyNc9xmUF HJWEP7kIi55QLeG8fQwXugnVY0/3GEUPDTAZbGGI0if+BKE/6LmCIoTF0YAgOkTPZMe9Ww /2jGlCjuXN5qzWiB3juFX+yK7VutWjXla1gr/HBzBc2n8TsPxsWZvbR/1TcGvEgMSCw6Cb vpOPFewgKmcMgiJ7KlJl13l7ZmCpG2xDHpwOeWYuEsx6hHXIwPdv493dVqHseB5DQbICcP tXfUG1s8F/kpyTzdwZGf21fI4AgVtKZC7qSDyHuLThVp9rrQ5RdLQmLjBqjgSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768040570; 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=AM3m7YNVv3PdfdBLav2gQiLfSNaEQ4yAx00DRp1li2w=; b=XeB0p51o75XdDeJ+Oz1uduxY+Yc78D2e8tWjSpJJ5MCAIJk30h+DWiTUtpWlb6EhJfy9Uh tNCFEQnbkUegjG5F1cl/FH+2h67YzzkB7B0oc/zqQ+elWG9BY0v6EtEo4OFbqT7HruL/lM yowJTijVy2/iHSr3e8yXK3PndiO+nOn+/IYyrZAklNOKEoO27JBNOIT+hqHiSLewu8nBte aUarBX66O/HvRblQytQ5W9O6doZUkOIaH4oYSBhzfWFAveCdXG6024ReXRjc/YCUwEgux9 lOa9aKeeS29hfcBFz0Epl9kliC+Qzxi38h9HBv3DwCea92lRsH6A03IWaLHfJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768040570; a=rsa-sha256; cv=none; b=HDn18E/l83Ewa18ZXFDdEjH2YZvxMaYviun3ErzsW5+aYCkz5pQi//ZdDIL11SLVTieHhY RRH9wLQjY5F6yhPhtO1UejF4jdrAQB2B3veclHF5hHtnimT29cmwgiFKtCncvhCeoDtNVp z8nSE7b57EDxODeEUN2K4394Y0pYCYUR/UVsesCupBfXpahwdrq2XJYaV3pQ/dM+j2YV8P AC2yYwY1iAHiWf52E+UuFMmGXfImJ4IIA5rm+IlXEK7LzMHhJmyVnSIos3ehuGWFClf+I/ PuWMFMNDpJyGX7XONSgDBii5Y5Au411K9lgnTfuui30C2Xc6J4nYCcAAjEt9MA== 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 4dpF8B38Y9zrV2 for ; Sat, 10 Jan 2026 10:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 238da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 10:22:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 71f4eb518cd9 - stable/15 - pf: don't reject route-to'd too-large packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 71f4eb518cd9241b429afebe5333aa1d6b7b46c6 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 10:22:50 +0000 Message-Id: <6962287a.238da.19dbbc55@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=71f4eb518cd9241b429afebe5333aa1d6b7b46c6 commit 71f4eb518cd9241b429afebe5333aa1d6b7b46c6 Author: Kristof Provost AuthorDate: 2025-12-26 09:58:59 +0000 Commit: Kristof Provost CommitDate: 2026-01-10 09:50:37 +0000 pf: don't reject route-to'd too-large packets If we're sending a packet via pf_route()/pf_route6() we check for packet size and potentially generate ICMP(6) packet too big messages. If we do, don't consider this a rejected packet. That is, return PF_PASS and set the mbuf to NULL rather than returning PF_DROP. This matters for locally generated packets, because with PF_DROP we can end up returning EACCES to userspace, causing the connection to terminate. Instead, with PF_PASS and a NULL mbuf this is translated to PFIL_CONSUMED, which does not return an error to userspace. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 2e7699355f08258365fb5f65d11ac297e20f78de) --- sys/netpfil/pf/pf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 567615acdf0c..2cd3ee535b85 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9343,7 +9343,8 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, ifp->if_mtu, pd->af, r, pd->act.rtableid); } SDT_PROBE1(pf, ip, route_to, drop, __LINE__); - action = PF_DROP; + /* Return pass, so we return PFIL_CONSUMED to the stack. */ + action = PF_PASS; goto bad; } @@ -9665,7 +9666,8 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, pf_send_icmp(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu, pd->af, r, pd->act.rtableid); } - action = PF_DROP; + /* Return pass, so we return PFIL_CONSUMED to the stack. */ + action = PF_PASS; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; }