pf: Apply $pf_flags when verifying the pf.conf file

When checking the validity of the pf.conf file also include the user supplied
pf_flags. These flags might overrule macros or specify anchors, which we will
apply when actually applying the pf.conf file, so we must also take them into
account when verifying the validity.

Submitted by:	Andreas Longwitz <longwitz at incore.de>
MFC after:	3 weeks
This commit is contained in:
Kristof Provost 2018-02-28 09:59:58 +00:00
parent 5830b90f4b
commit 6b8bcdc1e8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330108

View File

@ -47,13 +47,13 @@ pf_stop()
pf_check()
{
echo "Checking pf rules."
$pf_program -n -f "$pf_rules"
$pf_program -n -f "$pf_rules" $pf_flags
}
pf_reload()
{
echo "Reloading pf rules."
$pf_program -n -f "$pf_rules" || return 1
$pf_program -n -f "$pf_rules" $pf_flags || return 1
$pf_program -f "$pf_rules" $pf_flags
}