diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-05-23 23:43:03 -0700 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-05-24 07:47:29 -0300 |
commit | 608c78e17e1ea0ba92c427b20e5d7037b629ae7e (patch) | |
tree | e4b37e095bc66fe4613866be784454563730d98f /src/etc | |
parent | cf44fe72313cb00d76922761f75656f1d92a3ae3 (diff) | |
download | pfsense-608c78e17e1ea0ba92c427b20e5d7037b629ae7e.zip pfsense-608c78e17e1ea0ba92c427b20e5d7037b629ae7e.tar.gz |
URL Table (Ports) File Comments
Fix for Bug #6395 that keeps full line comments of the downloaded file but strips them for the pf rules load.
(cherry picked from commit e7e1e514607e7b017e5407326cfd7ddb439963d0)
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/filter.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index 9556e15..f6cf51c 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -850,7 +850,8 @@ function filter_generate_aliases() { // TODO: Change it when pf supports tables with ports $urlfn = alias_expand_urltable($aliased['name']); if ($urlfn) { - $aliases .= "{$aliased['name']} = \"{ " . preg_replace("/\n/", " ", file_get_contents($urlfn)) . " }\"\n"; + $ports_tmp = parse_aliases_file($urlfn, "url_ports", "-1", false); + $aliases .= "{$aliased['name']} = \"{ " . preg_replace("/\n/", " ", implode("\n", $ports_tmp)) . " }\"\n"; } break; case "port": |