summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index 3048b67..82514d8 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -59,14 +59,17 @@ if (!$clientip) {
exit;
}
+$listenporthttps = $cpcfg['listenporthttps'] ? $cpcfg['listenporthttps'] : ($cpcfg['zoneid'] + 1);
+$listenporthttp = $cpcfg['listenporthttp'] ? $cpcfg['listenporthttp'] : $cpcfg['zoneid'];
+
if (isset($config['captiveportal'][$cpzone]['httpslogin']))
- $ourhostname = $config['captiveportal'][$cpzone]['httpsname'] . ":" . ($cpcfg['zoneid'] + 1);
+ $ourhostname = $config['captiveportal'][$cpzone]['httpsname'] . ":" . $listenporthttps;
else {
$ifip = portal_ip_from_client_ip($clientip);
if (!$ifip)
- $ourhostname = $config['system']['hostname'] . $config['system']['domain'] . ":{$cpcfg['zoneid']}";
+ $ourhostname = $config['system']['hostname'] . $config['system']['domain'] . ":{$listenporthttp}";
else
- $ourhostname = "{$ifip}:{$cpcfg['zoneid']}";
+ $ourhostname = "{$ifip}:{$listenporthttp}";
}
if ($orig_host != $ourhostname) {
OpenPOWER on IntegriCloud