/etc/rc.d/pf: Fix for multi-line pf_fallback_rules
Setting multiple pf_fallback_rules in /etc/rc.conf as per the documentation produces invalid pf syntax due to the lack of echo quoting $pf_fallback_rules in /etc/rc.d/pf. Adding quotes around the $pf_fallback_rules echo maintains newlines needed for valid pfctl syntax. Provided patch resolves the issue Also updating rc.conf(5) to reflect that multi-line pf_fallback_rules should not include a trailing backslash (\) as line breaks are needed when passing rules to pfctl via stdin. PR: 288197 Reviewed by: kp MFC after: 2 weeks
This commit is contained in:
committed by
Kristof Provost
parent
da84054f3a
commit
9e8c1f9576
+1
-1
@@ -38,7 +38,7 @@ pf_fallback()
|
||||
$pf_program -f "$pf_fallback_rules_file" $pf_flags
|
||||
else
|
||||
warn "Loading fallback rules: $pf_fallback_rules"
|
||||
echo $pf_fallback_rules | $pf_program -f - $pf_flags
|
||||
echo "$pf_fallback_rules" | $pf_program -f - $pf_flags
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user