aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-09-10 15:20:39 +0000
committerKristof Provost <kp@FreeBSD.org>2021-09-17 15:55:42 +0000
commit1e7e7452d59bb688479e13df04d95346a2ae48b6 (patch)
tree1bf0edb1587370723b6450cd748f548219d00eed
parentd073473bc63c4cd6c1aa17f1e6fc5069adb7dd07 (diff)
downloadsrc-1e7e7452d59bb688479e13df04d95346a2ae48b6.tar.gz
src-1e7e7452d59bb688479e13df04d95346a2ae48b6.zip
pf: fix NOINET6 builds
MFC after: 1 week Sponsored by: Modirum MDPay (cherry picked from commit 9bdff593ead9434e01cfb6084f21c3e93a22963d)
-rw-r--r--sys/netpfil/pf/pf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 42e8f3279599..20e775148b7a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1486,6 +1486,7 @@ static bool
pf_isforlocal(struct mbuf *m, int af)
{
switch (af) {
+#ifdef INET
case AF_INET: {
struct rm_priotracker in_ifa_tracker;
struct ip *ip;
@@ -1502,6 +1503,8 @@ pf_isforlocal(struct mbuf *m, int af)
IN_IFADDR_RUNLOCK(&in_ifa_tracker);
break;
}
+#endif
+#ifdef INET6
case AF_INET6: {
struct ip6_hdr *ip6;
struct in6_ifaddr *ia;
@@ -1511,6 +1514,7 @@ pf_isforlocal(struct mbuf *m, int af)
return (false);
return (! (ia->ia6_flags & IN6_IFF_NOTREADY));
}
+#endif
default:
panic("Unsupported af %d", af);
}