diff options
author | Ermal <eri@pfsense.org> | 2013-02-13 21:57:30 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-13 21:58:52 +0000 |
commit | 1b584e3ff3dd70d05668fce32b257cecd6ed780b (patch) | |
tree | 3798f5faec8ca88dc3c2326704c883d989087e20 /etc/inc/captiveportal.inc | |
parent | bddd2be844d8f485ef41145c6384b7cacb74a944 (diff) | |
download | pfsense-1b584e3ff3dd70d05668fce32b257cecd6ed780b.zip pfsense-1b584e3ff3dd70d05668fce32b257cecd6ed780b.tar.gz |
During bootup do not try to resolve hostnames filterdns will handle those
Diffstat (limited to 'etc/inc/captiveportal.inc')
-rw-r--r-- | etc/inc/captiveportal.inc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 0872b46..4c1145c 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -970,14 +970,17 @@ function captiveportal_passthrumac_findbyname($username) { * table (3=IN)/(4=OUT) hold allowed ip's without bw limits */ function captiveportal_allowedip_configure_entry($ipent, $ishostname = false) { + global $g; /* Instead of copying this entire function for something * easy such as hostname vs ip address add this check */ if ($ishostname === true) { - $ipaddress = gethostbyname($ipent['hostname']); - if (!is_ipaddr($ipaddress)) - return; + if (!$g['booting']) { + $ipaddress = gethostbyname($ipent['hostname']); + if (!is_ipaddr($ipaddress)) + return; + } } else $ipaddress = $ipent['ip']; @@ -993,6 +996,8 @@ function captiveportal_allowedip_configure_entry($ipent, $ishostname = false) { if ($ishostname === true) { $cp_filterdns_conf .= "ipfw {$ipent['hostname']} 3 pipe {$pipeno}\n"; $cp_filterdns_conf .= "ipfw {$ipent['hostname']} 4 pipe {$pipedown}\n"; + if (!is_ipaddr($ipaddress)) + return array("", $cp_filterdns_conf); } $subnet = ""; if (!empty($ipent['sn'])) |