diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-21 23:02:04 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-21 23:02:04 +0000 |
commit | b27f1caf39f866b30093d6cbb5ffbfb9434cfbef (patch) | |
tree | 8b6e9cbfc17249a2b90aaa72a29fb1fe4646ae82 /etc | |
parent | f8b1131038f1a8ced102c79ed6c72ef9dc05e6f1 (diff) | |
download | pfsense-b27f1caf39f866b30093d6cbb5ffbfb9434cfbef.zip pfsense-b27f1caf39f866b30093d6cbb5ffbfb9434cfbef.tar.gz |
Make the CP interface check code more buller proof.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index ef793e7..0047524 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -57,13 +57,15 @@ function captiveportal_configure() { foreach ($cpinterfaces as $cpifgrp) { if (!isset($ifaces[$cpifgrp])) continue; - if ($firsttime > 0) - $cpinterface .= " or "; - $firsttime = 1; $tmpif = get_real_interface($cpifgrp); if (!empty($tmpif)) { + if ($firsttime > 0) + $cpinterface .= " or "; $cpinterface .= "via {$tmpif}"; - $cpips[] = get_interface_ip($cpifgrp); + $firsttime = 1; + $cpipm = get_interface_ip($cpifgrp); + if (is_ipaddr($cpipm)) + $cpips[] = $cpipm; } } if (count($cpips) > 0) { |