summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-06-08 19:53:54 +0000
committerErmal <eri@pfsense.org>2011-06-08 19:53:54 +0000
commitc7422829b2a76301d2efbe0aa01e3dcfcce3012f (patch)
treeccf137d0d46090627125e7063b549d81246dd2b1
parent92ca32ccbe27d00d9fc2a22ceea11b0506433ace (diff)
downloadpfsense-c7422829b2a76301d2efbe0aa01e3dcfcce3012f.zip
pfsense-c7422829b2a76301d2efbe0aa01e3dcfcce3012f.tar.gz
Fixes #1341. If a table has not entries it is marked as persist and pf(4) does not clear its contents. Schedule a table flush for these tables after filter reload to make sure an entry is not forgotten.
-rw-r--r--etc/inc/filter.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 9b0c0be..38ab773 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -504,11 +504,13 @@ function filter_expand_alias($alias_name)
}
function filter_generate_aliases() {
- global $config, $FilterIflist;
+ global $config, $FilterIflist, $after_filter_configure_run;
+
if(isset($config['system']['developerspew'])) {
$mt = microtime();
echo "filter_generate_aliases() being called $mt\n";
}
+
$alias = "#System aliases\n ";
$aliases = "loopback = \"{ lo0 }\"\n";
@@ -554,9 +556,10 @@ function filter_generate_aliases() {
case "network":
case "url":
$tableaddrs = "{$addrlist}{$extralias}";
- if(empty($tableaddrs))
+ if(empty($tableaddrs)) {
$aliases .= "table <{$aliased['name']}> persist\n";
- else
+ $after_filter_configure_run[] = "/sbin/pfctl -T flush -t " . escapeshellarg($aliased['name']);
+ } else
$aliases .= "table <{$aliased['name']}> { {$addrlist}{$extralias} } \n";
$aliases .= "{$aliased['name']} = \"<{$aliased['name']}>\"\n";
OpenPOWER on IntegriCloud