Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jul 2020 19:07:37 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363278 - head/contrib/ipfilter/tools
Message-ID:  <202007171907.06HJ7bSP015772@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Fri Jul 17 19:07:37 2020
New Revision: 363278
URL: https://svnweb.freebsd.org/changeset/base/363278

Log:
  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

Modified:
  head/contrib/ipfilter/tools/ipfstat.c

Modified: head/contrib/ipfilter/tools/ipfstat.c
==============================================================================
--- head/contrib/ipfilter/tools/ipfstat.c	Fri Jul 17 19:07:34 2020	(r363277)
+++ head/contrib/ipfilter/tools/ipfstat.c	Fri Jul 17 19:07:37 2020	(r363278)
@@ -913,12 +913,12 @@ static void printdeadlist(fiop, out, set, fp, group, c
 		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;
 		}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007171907.06HJ7bSP015772>