From nobody Fri Jun 6 11:17:11 2025 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 4bDJgW40wVz5yC26; Fri, 06 Jun 2025 11:17:11 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bDJgW20tSz3JwV; Fri, 06 Jun 2025 11:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749208631; 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=wEAM+Tp/0b+vFYk9W60trC1xpU2GVGO3PTHr585W1C0=; b=DL6jouBwx+TLQ27vsX6zIZl8aZ1uJVAr3Uvzseor1Hxl0DTVUsJGsX70Ihfn2nxWD71SkC iL63/ehjCy1j+Va0UnneCEsp62Uzkg0bUGKWXnCHPQMDYL0AY29bBlsNwRDybntcrWPYcg DiMSOcf02UOIKJ3xDuAXaLtE5qnYh2ZaioebjhcJUPgdAqjrFPbruchs6p4ibavh3hXstz SrV9SL7+ctwydFcY4tmtcuW+B0M+9kLmEAvV1tP/O7eh7gPKLMGlZ783W1jWtzprAfVAxV VK1kE75Ms6DIWsk99Qk78MK/LeVVKIF/1HqDM9KpuOBv5OLVIREBn1TP85K2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749208631; 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=wEAM+Tp/0b+vFYk9W60trC1xpU2GVGO3PTHr585W1C0=; b=k/F21ZN+nD2MGfkj+IgJoYnn4Ir/uxPrCD8GQRW6yr0DuG1ywt2HBZfIIg1T75KT174bmn Rn2Sbkl+flxU5eHRsmnNE1Jgf2cmGos3JSa/IAHFHQ915Z0qTJH3W65kiwXo83puXHPyoG TQ+BoOGZwzQaisfw8oqavzyz4/CwJF5OKyQV/JK9OjJug4IKz7DUJxJB6PqGXLvsIB5+mJ R0dTe/SBKlwJZIEhEv5ruFWQSdSpcsKms8Kf0Dc5h8pmdu0c1Zs158Loao2PCSTLBP9jsa XRKp2PKqRhzyuUS3rkFrTQScbwK1a9dHc0xJPXxAQlXVNaxllkKk5zgIhQHweA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749208631; a=rsa-sha256; cv=none; b=MUp/htefrZ/viJsQ1EyG9OQQ7bLFPhCbsiUh+a/d+Ii6JmHLIlaJozl5XvVDfp1oTi7jLw EYCkDf+6rCGskdWh02pKHy7S/lOd6oSvOxcFcuc797sY11RRH0iCUH8mSUUqb1nt61AWUJ U46fIIlXnbbHrOwNFU8fhG4s0KmIb+n2qnQc6XTQMWZfM66ntRmnVTv0+UPmPwlgy3s/r/ Qn5MNBVEIqQM7kjy3A3d2iyMfi0lodbgqy+80scruUDLdM1ToYnfkS0NuZyxyCZSgGzXMA 489SvsNPIohye2GYYoKkeBem3aqC5uG2VfKqfbl45TsRVN1cZBub4yAnrZiqGg== 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 4bDJgW1b1bzsBN; Fri, 06 Jun 2025 11:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 556BHBwr083609; Fri, 6 Jun 2025 11:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 556BHBbI083606; Fri, 6 Jun 2025 11:17:11 GMT (envelope-from git) Date: Fri, 6 Jun 2025 11:17:11 GMT Message-Id: <202506061117.556BHBbI083606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3be4d54ecd11 - main - pf: use 'struct ah' for the AH extension header rather than 'struct ip6_ext' 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 3be4d54ecd118ab6e29a3aa80329e710d8c2fee1 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3be4d54ecd118ab6e29a3aa80329e710d8c2fee1 commit 3be4d54ecd118ab6e29a3aa80329e710d8c2fee1 Author: Kristof Provost AuthorDate: 2025-05-27 15:02:46 +0000 Commit: Kristof Provost CommitDate: 2025-06-06 11:15:59 +0000 pf: use 'struct ah' for the AH extension header rather than 'struct ip6_ext' This fixes the build for NOINET6 kernels, but also more accurately reflects what we're doing. The first two fields are the same, so the only functional change is that we require slightly more data in the first fragment now. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D50658 --- sys/netpfil/pf/pf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 69a68d0249b2..0cfb728c3eb5 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -114,6 +114,8 @@ #include #include +#include + #include #include @@ -9694,7 +9696,7 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, static int pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) { - struct ip6_ext ext; + struct ah ext; u_int32_t hlen, end; hlen = h->ip_hl << 2; @@ -9720,8 +9722,8 @@ pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) DPFPRINTF(PF_DEBUG_MISC, ("IP short exthdr")); return (PF_DROP); } - pd->off += (ext.ip6e_len + 2) * 4; - pd->proto = ext.ip6e_nxt; + pd->off += (ext.ah_len + 2) * 4; + pd->proto = ext.ah_nxt; break; default: return (PF_PASS);