Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 09:55:49 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r331287 - stable/10/etc/rc.d
Message-ID:  <201803210955.w2L9tnLO046630@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Wed Mar 21 09:55:49 2018
New Revision: 331287
URL: https://svnweb.freebsd.org/changeset/base/331287

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

Modified:
  stable/10/etc/rc.d/pf
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/pf
==============================================================================
--- stable/10/etc/rc.d/pf	Wed Mar 21 09:55:19 2018	(r331286)
+++ stable/10/etc/rc.d/pf	Wed Mar 21 09:55:49 2018	(r331287)
@@ -46,13 +46,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
 	# Flush everything but existing state entries that way when
 	# rules are read in, it doesn't break established connections.
 	$pf_program -Fnat -Fqueue -Frules -FSources -Finfo -FTables -Fosfp > /dev/null 2>&1



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