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
This commit is contained in:
Cy Schubert 2020-07-17 19:07:37 +00:00
parent ce1c2aafce
commit 5317660176

View File

@ -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;
}