svn commit: r330108 - head/etc/rc.d

Kristof Provost kp at FreeBSD.org
Wed Feb 28 09:59:59 UTC 2018


Author: kp
Date: Wed Feb 28 09:59:58 2018
New Revision: 330108
URL: https://svnweb.freebsd.org/changeset/base/330108

Log:
  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

Modified:
  head/etc/rc.d/pf

Modified: head/etc/rc.d/pf
==============================================================================
--- head/etc/rc.d/pf	Wed Feb 28 09:59:44 2018	(r330107)
+++ head/etc/rc.d/pf	Wed Feb 28 09:59:58 2018	(r330108)
@@ -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
 }
 


More information about the svn-src-all mailing list