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:
kp 2018-02-28 09:59:58 +00:00
parent 0375d06035
commit 738a0fdbeb

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
}