summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-03-23 14:21:06 -0400
committerjim-p <jimp@pfsense.org>2017-03-23 14:21:06 -0400
commit224e1648174e4a27b7f091fe348a81c74bacf23e (patch)
tree2069dcabc470a982518840c5f30ce8091d895f2d /src
parent6aee3af6d5e82acd15ab8c9d4218aaf92f14f857 (diff)
downloadpfsense-224e1648174e4a27b7f091fe348a81c74bacf23e.zip
pfsense-224e1648174e4a27b7f091fe348a81c74bacf23e.tar.gz
File a notice and omit rule(s) using a missing port alias. Fixes #7421
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/filter.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
index be68d03..1d07495 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -2700,6 +2700,16 @@ function filter_generate_user_rule($rule) {
file_notice("Filter_Reload", $error_text);
return "# {$error_text}";
}
+ if ($rule['source']['port'] && !alias_expand($rule['source']['port'])) {
+ $error_text = sprintf(gettext("Unresolvable source port alias '%1\$s' for rule '%2\$s'"), $rule['source']['port'], $rule['descr']);
+ file_notice("Filter_Reload", $error_text);
+ return "# {$error_text}";
+ }
+ if ($rule['destination']['port'] && !alias_expand($rule['destination']['port'])) {
+ $error_text = sprintf(gettext("Unresolvable destination port alias '%1\$s' for rule '%2\$s'"), $rule['destination']['port'], $rule['descr']);
+ file_notice("Filter_Reload", $error_text);
+ return "# {$error_text}";
+ }
update_filter_reload_status(gettext("Setting up pass/block rules"));
$type = $rule['type'];
if ($type != "pass" && $type != "block" && $type != "reject" && $type != "match") {
OpenPOWER on IntegriCloud