From 5317660176971eac99d07f4af30a83537ecdeea6 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Fri, 17 Jul 2020 19:07:37 +0000 Subject: [PATCH] fr_family (the protocol family) must be AF_INET or AF_INET6, as in the kernel, not an arbitrary 4 or 6. This only affected printing ipfilter stats and rules from a kernel dump. (This is currently undocumented.) PR: 247952 MFC after: 1 week --- contrib/ipfilter/tools/ipfstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ipfilter/tools/ipfstat.c b/contrib/ipfilter/tools/ipfstat.c index d37c46dd110a..64de48f11be9 100644 --- a/contrib/ipfilter/tools/ipfstat.c +++ b/contrib/ipfilter/tools/ipfstat.c @@ -913,12 +913,12 @@ static void printdeadlist(fiop, out, set, fp, group, comment) fp = &fb; #ifdef USE_INET6 if (use_inet6 != 0) { - if (fp->fr_family != 0 && fp->fr_family != 6) + if (fp->fr_family != 0 && fp->fr_family != AF_INET6) continue; } else #endif { - if (fp->fr_family != 0 && fp->fr_family != 4) + if (fp->fr_family != 0 && fp->fr_family != AF_INET) continue; }