Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 09:55:20 +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-11@freebsd.org
Subject:   svn commit: r331286 - stable/11/etc/rc.d
Message-ID:  <201803210955.w2L9tKel046565@repo.freebsd.org>

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

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/11/etc/rc.d/pf
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/rc.d/pf
==============================================================================
--- stable/11/etc/rc.d/pf	Wed Mar 21 09:07:01 2018	(r331285)
+++ stable/11/etc/rc.d/pf	Wed Mar 21 09:55:19 2018	(r331286)
@@ -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
 	# 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.w2L9tKel046565>