Allow forced start of ipmon in special cases where testing is desired

(or other special cases) and when ipfilter is disabled in rc.conf but
started by other means.

MFC after:	1 week
This commit is contained in:
Cy Schubert 2018-11-22 04:48:27 +00:00
parent 248b5d08b3
commit d19c1c8ec2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340754

View File

@ -21,7 +21,7 @@ ipmon_precmd()
# Continue only if ipfilter or ipnat is enabled and the
# ipfilter module is loaded.
#
if ! checkyesno ipfilter_enable && ! checkyesno ipnat_enable ; then
if ! checkyesno ipfilter_enable && ! checkyesno ipnat_enable && ! checkyesno rc_force ; then
err 1 "${name} requires either ipfilter or ipnat enabled"
fi
if ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes' >/dev/null 2>&1; then