Date: Thu, 5 Nov 2015 17:37:15 +0000 (UTC) From: Kurt Lidl <lidl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290405 - head/etc/periodic/security Message-ID: <201511051737.tA5HbFkh068498@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lidl Date: Thu Nov 5 17:37:14 2015 New Revision: 290405 URL: https://svnweb.freebsd.org/changeset/base/290405 Log: 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. PR: conf/187224 Approved by: rpaulo (mentor) Differential Revision: https://reviews.freebsd.org/D4068 Modified: head/etc/periodic/security/520.pfdenied Modified: head/etc/periodic/security/520.pfdenied ============================================================================== --- head/etc/periodic/security/520.pfdenied Thu Nov 5 17:26:56 2015 (r290404) +++ head/etc/periodic/security/520.pfdenied Thu Nov 5 17:37:14 2015 (r290405) @@ -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?201511051737.tA5HbFkh068498>