Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Dec 2015 21:57:26 +0000 (UTC)
From:      Kurt Lidl <lidl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r292672 - stable/10/etc/periodic/security
Message-ID:  <201512232157.tBNLvQMv090535@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lidl
Date: Wed Dec 23 21:57:26 2015
New Revision: 292672
URL: https://svnweb.freebsd.org/changeset/base/292672

Log:
  MFC r290405:
  
  Restrict 520.pfdenied to only list rules that blocked traffic.
  Before this change, the 520.pfdenied script listed all rules that
  matched /^block/ in the rule. Restrict the printed output to only
  those rules that result in packets being dropped.
  
  Approved by:	rpaulo (mentor)

Modified:
  stable/10/etc/periodic/security/520.pfdenied
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/periodic/security/520.pfdenied
==============================================================================
--- stable/10/etc/periodic/security/520.pfdenied	Wed Dec 23 21:55:54 2015	(r292671)
+++ stable/10/etc/periodic/security/520.pfdenied	Wed Dec 23 21:57:26 2015	(r292672)
@@ -44,7 +44,7 @@ rc=0
 if check_yesno_period security_status_pfdenied_enable
 then
 	TMP=`mktemp -t security`
-	if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); print buf$0;} }' > ${TMP}; then
+	if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' > ${TMP}; then
 	  check_diff new_only pf ${TMP} "${host} pf denied packets:"
 	fi
 	rc=$?



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