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:		27f54be50b
Reviewed by:	kp, imp
Differential Revision:	https://reviews.freebsd.org/D46877
This commit is contained in:
Dag-Erling Smørgrav 2024-10-02 19:50:01 +02:00
parent e5c64b2662
commit 1c82bbd865

View File

@ -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 */