aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic
diff options
context:
space:
mode:
authorKurt Lidl <lidl@FreeBSD.org>2015-11-05 17:37:14 +0000
committerKurt Lidl <lidl@FreeBSD.org>2015-11-05 17:37:14 +0000
commit962942b5d625762655508f2c4d8c04029aa33253 (patch)
tree75c924b6bbae038bfc974cfa12f78c568ed05696 /etc/periodic
parent6ced1f7802c8f1b64bbab36fd28851b56a3594be (diff)
downloadsrc-962942b5d625762655508f2c4d8c04029aa33253.tar.gz
src-962942b5d625762655508f2c4d8c04029aa33253.zip
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
Notes
Notes: svn path=/head/; revision=290405
Diffstat (limited to 'etc/periodic')
-rwxr-xr-xetc/periodic/security/520.pfdenied2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/periodic/security/520.pfdenied b/etc/periodic/security/520.pfdenied
index 7a32bf2a193b..3fea360f4582 100755
--- a/etc/periodic/security/520.pfdenied
+++ b/etc/periodic/security/520.pfdenied
@@ -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=$?