svn commit: r292672 - stable/10/etc/periodic/security
Kurt Lidl
lidl at FreeBSD.org
Wed Dec 23 21:57:27 UTC 2015
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=$?
More information about the svn-src-stable-10
mailing list