1128473Sdarrenr#!/bin/sh -
2128473Sdarrenr#
3128473Sdarrenr# Copyright (c) 2001  The FreeBSD Project
4128473Sdarrenr# All rights reserved.
5128473Sdarrenr#
6128473Sdarrenr# Redistribution and use in source and binary forms, with or without
7128473Sdarrenr# modification, are permitted provided that the following conditions
8128473Sdarrenr# are met:
9128473Sdarrenr# 1. Redistributions of source code must retain the above copyright
10128473Sdarrenr#    notice, this list of conditions and the following disclaimer.
11128473Sdarrenr# 2. Redistributions in binary form must reproduce the above copyright
12128473Sdarrenr#    notice, this list of conditions and the following disclaimer in the
13128473Sdarrenr#    documentation and/or other materials provided with the distribution.
14128473Sdarrenr#
15128473Sdarrenr# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16128473Sdarrenr# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17128473Sdarrenr# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18128473Sdarrenr# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19128473Sdarrenr# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20128473Sdarrenr# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21128473Sdarrenr# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22128473Sdarrenr# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23128473Sdarrenr# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24128473Sdarrenr# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25128473Sdarrenr# SUCH DAMAGE.
26128473Sdarrenr#
27128473Sdarrenr# $FreeBSD: releng/10.3/etc/periodic/security/610.ipf6denied 254974 2013-08-27 21:20:28Z jlh $
28128473Sdarrenr#
29128473Sdarrenr
30128473Sdarrenr# If there is a global system configuration file, suck it in.
31128473Sdarrenr#
32128473Sdarrenrif [ -r /etc/defaults/periodic.conf ]
33128473Sdarrenrthen
34128473Sdarrenr    . /etc/defaults/periodic.conf
35128473Sdarrenr    source_periodic_confs
36128473Sdarrenrfi
37128473Sdarrenr
38128473Sdarrenr. /etc/periodic/security/security.functions
39128473Sdarrenr
40254974Sjlhsecurity_daily_compat_var security_status_ipf6denied_enable
41254974Sjlh
42128473Sdarrenrrc=0
43128473Sdarrenr
44254974Sjlhif check_yesno_period security_status_ipf6denied_enable
45254974Sjlhthen
46128473Sdarrenr	TMP=`mktemp ${TMPDIR:-/tmp}/security.XXXXXXXXXX`
47128473Sdarrenr	if ipfstat -nhio6 2>/dev/null | grep block > ${TMP}; then
48128473Sdarrenr	 check_diff new_only ipf6 ${TMP} "${host} ipf6 denied packets:"
49128473Sdarrenr	fi
50128473Sdarrenr	rc=$?
51254974Sjlh	rm -f ${TMP}
52254974Sjlhfi
53128473Sdarrenr
54128473Sdarrenrexit $rc
55