summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorlidl <lidl@FreeBSD.org>2015-12-23 21:57:26 +0000
committerlidl <lidl@FreeBSD.org>2015-12-23 21:57:26 +0000
commit8d600f995bdad830aacc775d19cd7c7178c78119 (patch)
tree5067c5123aafa17125cc28cc0fe13e431a2a04f8 /etc
parentce8728e0fac8e73c4cf9e1fb0aefa24b63b0813a (diff)
downloadFreeBSD-src-8d600f995bdad830aacc775d19cd7c7178c78119.zip
FreeBSD-src-8d600f995bdad830aacc775d19cd7c7178c78119.tar.gz
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)
Diffstat (limited to 'etc')
-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 7a32bf2..3fea360 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=$?
OpenPOWER on IntegriCloud