git: b37707bb3930 - main - pf: fix LINT-NOINET6 build
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 15 Oct 2022 08:03:44 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b37707bb39302af837e8f2531f448b8216ab2bb3 commit b37707bb39302af837e8f2531f448b8216ab2bb3 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2022-10-15 08:01:46 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2022-10-15 08:02:35 +0000 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 d0139dc6bd15..698e0588c1db 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);