mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make the CP interface check code more buller proof.
This commit is contained in:
parent
f8b1131038
commit
b27f1caf39
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user