summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-12-15 10:47:19 +0000
committerErmal Luçi <eri@pfsense.org>2009-12-15 10:47:19 +0000
commit32f0eb874fa120d95ae83e756b90d765b908b688 (patch)
tree0f00a51279c89009e83d5a76df8f093174846f1e /etc/inc
parent7fa79fff2122587949f7b981f74800b5daaa03a3 (diff)
downloadpfsense-32f0eb874fa120d95ae83e756b90d765b908b688.zip
pfsense-32f0eb874fa120d95ae83e756b90d765b908b688.tar.gz
Reverting this because:
1- It is broken. It breaks the recursivity of the function itself. 2- It harms the boot time of pfSense too much. 3- It impacts the filter reload too much. 4- My own opinion it is not the right way to do it, although the easiest. Revert "Make sure that hostnames inside a alias that does not resolve will not result in a unloadable ruleset." This reverts commit 201fbd66cd60a86aa2002486fd729054e5bcd094.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc14
1 files changed, 2 insertions, 12 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 8aec934..0e8fe87 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -378,23 +378,13 @@ function filter_generate_scrubing()
return $scrubrules;
}
-function filter_generate_nested_alias($name, $alias, $type, &$aliasnesting, &$aliasaddrnesting) {
+function filter_generate_nested_alias($name, $alias, &$aliasnesting, &$aliasaddrnesting) {
global $aliastable;
$addresses = split(" ", $alias);
$finallist = "";
$aliasnesting[$name] = $name;
foreach ($addresses as $address) {
- /* make sure to skip hostnames that do not resolve */
- if(($type == "network") || ($type == host)) {
- $explode = explode("/", $address);
- if(! is_ipaddr($explode[0])) {
- if(! is_ipaddr(gethostbyname($explode[0]))) {
- log_error("The hostname {$explode[0]} does not currently resolve, skipping");
- continue;
- }
- }
- }
$linelength = strlen($finallist);
$tmpline = "";
if (is_alias($address)) {
@@ -434,7 +424,7 @@ function filter_generate_aliases() {
$extraalias = " " . link_ip_to_carp_interface($ip);
$aliasnesting = array();
$aliasaddrnesting = array();
- $addrlist = filter_generate_nested_alias($aliased['name'], $aliased['address'], $aliased['type'], $aliasnesting, $aliasaddrnesting);
+ $addrlist = filter_generate_nested_alias($aliased['name'], $aliased['address'], $aliasnesting, $aliasaddrnesting);
if ($aliased['type'] == "host" || $aliased['type'] == "network") {
$aliases .= "table <{$aliased['name']}> { {$addrlist}{$extralias} } \n";
$aliases .= "{$aliased['name']} = \"<{$aliased['name']}>\"\n";
OpenPOWER on IntegriCloud