From b37707bb39302af837e8f2531f448b8216ab2bb3 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Sat, 15 Oct 2022 10:01:46 +0200 Subject: [PATCH] pf: fix LINT-NOINET6 build --- sys/netpfil/pf/pf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d0139dc6bd1..698e0588c1d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3073,14 +3073,18 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af, struct pf_mtag *pf_mtag; /* ICMP packet rate limitation. */ +#ifdef INET6 if (af == AF_INET6) { if (icmp6_ratelimit(NULL, type, code)) return; - } else { - MPASS(af == AF_INET); + } +#endif +#ifdef INET + if (af == AF_INET) { if (badport_bandlim(pf_icmp_to_bandlim(type)) != 0) return; } +#endif /* Allocate outgoing queue entry, mbuf and mbuf tag. */ pfse = malloc(sizeof(*pfse), M_PFTEMP, M_NOWAIT);