Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2018 09:59:58 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330108 - head/etc/rc.d
Message-ID:  <201802280959.w1S9xwv4009586@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802280959.w1S9xwv4009586>