svn commit: r331286 - stable/11/etc/rc.d

Kristof Provost kp at FreeBSD.org
Wed Mar 21 09:55:20 UTC 2018


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


More information about the svn-src-all mailing list