diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a98baeb4bdec96..9b76c9cbd6b96e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -576,8 +576,10 @@ static bool pf_is_loopback(sa_family_t af, struct pf_addr *addr) { switch (af) { +#ifdef INET case AF_INET: return IN_LOOPBACK(ntohl(addr->v4.s_addr)); +#endif case AF_INET6: return IN6_IS_ADDR_LOOPBACK(&addr->v6); default: diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 860580812e3bf8..8779d599900e17 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2224,6 +2224,7 @@ pf_scrub(struct pf_pdesc *pd) } /* random-id, but not for fragments */ +#ifdef INET if (pd->af == AF_INET && pd->act.flags & PFSTATE_RANDOMID && !(h->ip_off & ~htons(IP_DF))) { uint16_t ip_id = h->ip_id; @@ -2231,5 +2232,6 @@ pf_scrub(struct pf_pdesc *pd) ip_fillid(h); h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_id, h->ip_id, 0); } +#endif } #endif