diff options
author | alex <alex@FreeBSD.org> | 1998-02-04 01:53:19 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1998-02-04 01:53:19 +0000 |
commit | 4b7cf487fc7ab5b77e5ce1d593c7ca1a68d7f3bb (patch) | |
tree | 0f9e9c25f22c7efa317c32004a6e76a58bd099c8 /etc | |
parent | 099975fa279c4c88e3111370e503c46e8c002061 (diff) | |
download | FreeBSD-src-4b7cf487fc7ab5b77e5ce1d593c7ca1a68d7f3bb.zip FreeBSD-src-4b7cf487fc7ab5b77e5ce1d593c7ca1a68d7f3bb.tar.gz |
Display ipfw rules which have reached the log limit.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/security | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/etc/security b/etc/security index 1a66efa..f924916 100644 --- a/etc/security +++ b/etc/security @@ -1,7 +1,7 @@ #!/bin/sh - # # @(#)security 5.3 (Berkeley) 5/28/91 -# $Id: security,v 1.21 1997/08/01 01:25:21 brian Exp $ +# $Id: security,v 1.22 1997/09/26 01:38:30 alex Exp $ # PATH=/sbin:/bin:/usr/bin LC_ALL=C; export LC_ALL @@ -68,6 +68,18 @@ if ipfw -a l 2>/dev/null | egrep "deny|reset|unreach" > $TMP; then fi fi +# show ipfw rules which have reached the log limit +IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null` +if [ $? -eq 0 ] && [ $IPFW_LOG_LIMIT -ne 0 ]; then + ipfw -a l | grep " log " | perl -n -e \ + '/^\d+\s+(\d+)/; print if ($1 >= '$IPFW_LOG_LIMIT')' > $TMP + if [ -s $TMP ]; then + separator + echo "ipfw log limit reached:" + cat $TMP + fi +fi + # show kernel log messages if dmesg 2>/dev/null > $TMP; then if [ ! -f $LOG/dmesg.today ] ; then |