From nobody Wed Oct 02 17:56:50 2024 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 4XJjDf2xMfz5Xryx; Wed, 02 Oct 2024 17:56: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJjDf2RfYz4LH3; Wed, 2 Oct 2024 17:56:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727891810; 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=DtOxleQuJ6rLHAmBiRgOSoDoT7BfEvd73O/WdNfawC8=; b=fSFUtUtlMTEhDTkHQhag4p5vw66GM5ozM2YhYR1UNpqqNmzRvombbazs2UQYrKJOGuNbbR t4Dx+y7rkVr9pE1yhAjTpcHpZ14hHTaOgrZIWl6OxBEkzurHGI4PAmW2I/dJ2B6ty0cXTi D2hAyIqBbPx4mxcwue6pCRAMoJqPb6oqNFNmbgnFMPej9SnFmylBzA9ZLA6r04cSHMjtr2 +r4gueZIQCpaAUTB69IMlXlgrotPSSPtrCm5Pn1CIKUgFcRdqtP+IXgSM9U/qP7olI+dAN oo6xRrf6IePwNmzmJngQ/BT+trDbUEParDqgCdMoYM4GDVHsg6nNYX18SDSv+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727891810; 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=DtOxleQuJ6rLHAmBiRgOSoDoT7BfEvd73O/WdNfawC8=; b=SOwyz3OdPGQx2T4EbZxFivOv3MXgFg/UFnil0Yx/pLttfr9t4qEVuPDwcUCXqknSABU6/T HRwcBvCPNcsUNRN1JEJjYVptEuLaKakS74+eAXpYvwvJ47Namim3jCRGZ8AL7ODdWUwwm2 626RQTpd5pYtbhVMuFe4LWnOQEwDmLqMFB/9kb4JNyY+qCV0D0K/5BqV2C9W4rB7nkLO24 Kgz2AOJl49Qmo0HGymojcCq+05rG75Zmah+ofmJXzXmkt3LBGh2WlCLtPZGfk6w9fEdGIO Knm8efgnqNbdx4VfeIbY2dRKW/SrZeSqNEoJEwf89NUyssDuY78p1YLBFzV9vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727891810; a=rsa-sha256; cv=none; b=J6+YAh0MpGysb6y1Fv3KSiMaTsTgi/IDKLFaaV8zGf9JwIAEoJ9p1YmikUnH0HUZA/dirp xwDYr+NtO2VJgF6cFTKU2J2gD0fL9mLfFi2j2hkVSzKWaNRFPGq5WoCQMLhasOTdS/g6HN futoi2kRkIVb6OoOPUmXu67P/clJhhYMEbUGY00yGG/y6K9fHPnnmbGq6d/ADuL7F8KFHW A2o2NgNnj5Me0dWB2gbJSmZGjSv8v0tuLYPqrhlERSAAx1ry9aorJMFC6qbjOZ9VH/IOeg RL7ZEsSOlH79ZBoQEpwlYuVyviF+mSqau1kNGpskAnpqyO6RNVTgSTovoTZRCA== 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 4XJjDf1sTszGF2; Wed, 2 Oct 2024 17:56:50 +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 492Huo0k055426; Wed, 2 Oct 2024 17:56:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492HuoHI055423; Wed, 2 Oct 2024 17:56:50 GMT (envelope-from git) Date: Wed, 2 Oct 2024 17:56:50 GMT Message-Id: <202410021756.492HuoHI055423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 1c82bbd8650a - main - pf: Fix NOINET and NOINET6 build. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c82bbd8650ab2c7247342dac7460d18fea90ed0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1c82bbd8650ab2c7247342dac7460d18fea90ed0 commit 1c82bbd8650ab2c7247342dac7460d18fea90ed0 Author: Dag-Erling Smørgrav AuthorDate: 2024-10-02 17:50:01 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-10-02 17:54:10 +0000 pf: Fix NOINET and NOINET6 build. The issue was only apparent when ALTQ was not enabled, which is why it was not revealed by `make universe`. Fixes: 27f54be50bb Reviewed by: kp, imp Differential Revision: https://reviews.freebsd.org/D46877 --- sys/netpfil/pf/pf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index b5a18c37a89b..bbed285ab9f8 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8854,8 +8854,12 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 struct pfi_kkif *kif; u_short action, reason = 0; struct mbuf *m = *m0; +#ifdef INET struct ip *h = NULL; +#endif +#ifdef INET6 struct ip6_hdr *h6 = NULL; +#endif struct m_tag *mtag; struct pf_krule *a = NULL, *r = &V_pf_default_rule; struct pf_kstate *s = NULL; @@ -9210,10 +9214,14 @@ done: else pd.pf_mtag->qid = pd.act.qid; /* Add hints for ecn. */ +#ifdef INET if (af == AF_INET) pd.pf_mtag->hdr = h; - else +#endif +#ifdef INET6 + if (af == AF_INET6) pd.pf_mtag->hdr = h6; +#endif } } #endif /* ALTQ */