Revision e7bd2578
Added by Cyrill B over 12 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
1588 | 1588 |
} else { |
1589 | 1589 |
$httpport = $cpcfg['listenporthttp'] ? $cpcfg['listenporthttp'] : $cpcfg['zoneid']; |
1590 | 1590 |
$ifip = portal_ip_from_client_ip($clientip); |
1591 |
if (!$ifip) |
|
1591 |
if (!$ifip) {
|
|
1592 | 1592 |
$ourhostname = $config['system']['hostname'] . ":{$httpport}"; |
1593 |
else |
|
1594 |
$ourhostname = "{$ifip}:{$httpport}"; |
|
1593 |
} else { |
|
1594 |
if (is_ipaddrv6($ifip)) |
|
1595 |
$ourhostname = "[{$ifip}]:{$httpport}"; |
|
1596 |
else |
|
1597 |
$ourhostname = "{$ifip}:{$httpport}"; |
|
1598 |
} |
|
1595 | 1599 |
$htmltext = str_replace("\$PORTAL_ACTION\$", "http://{$ourhostname}/", $htmltext); |
1596 | 1600 |
$htmltext = str_replace("#PORTAL_ACTION#", "http://{$ourhostname}/", $htmltext); |
1597 | 1601 |
} |
Also available in: Unified diff
Add square brackets around IPv6 addresses