From 174861fdd94cbdbdad4071ac2db367ef956b4075 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 17 Feb 2005 19:56:30 +0000 Subject: [PATCH] Cleanup return_dir_as_array to not return . or .. and make the new firewall plugin system active. --- etc/inc/filter.inc | 17 ++++++++++++++--- etc/inc/pfsense-utils.inc | 11 +++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 3a6268d581..34fcaf2856 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -139,10 +139,16 @@ function filter_configure() { } else { /* process packager manager custom rules */ $files = return_dir_as_array("/usr/local/pkg/pf/"); - foreach ($files as $file) { - $text = return_filename_as_string($file); - eval($text); + if($files <> "") { + foreach ($files as $file) { + if($file <> "") { + $text = return_filename_as_string($file); + if($text != "") + eval($text); + } + } } + return 0; } } @@ -949,10 +955,12 @@ function filter_rules_generate() { $ipfrules .= << out +anchor "firewallout" pass out quick on $wanif inet proto tcp from $wanif to any keep state # enable ftp-proxy @@ -974,6 +982,7 @@ EOD; $ipfrules .= <<