Revision 905d1e8e
Added by Cyrill B over 12 years ago
usr/local/captiveportal/index.php | ||
---|---|---|
69 | 69 |
$ourhostname = $cpcfg['httpsname'] . ":" . $listenporthttps; |
70 | 70 |
else { |
71 | 71 |
$ifip = portal_ip_from_client_ip($clientip); |
72 |
if (!$ifip) |
|
72 |
if (!$ifip) {
|
|
73 | 73 |
$ourhostname = "{$config['system']['hostname']}.{$config['system']['domain']}:{$listenporthttp}"; |
74 |
else |
|
75 |
$ourhostname = "{$ifip}:{$listenporthttp}"; |
|
74 |
} else { |
|
75 |
if (is_ipaddrv6($ifip)) |
|
76 |
$ourhostname = "[{$ifip}]:{$listenporthttp}"; |
|
77 |
else |
|
78 |
$ourhostname = "{$ifip}:{$listenporthttp}"; |
|
79 |
} |
|
76 | 80 |
} |
77 | 81 |
|
78 | 82 |
if ($orig_host != $ourhostname) { |
Also available in: Unified diff
Add square brackets around IPv6 addresses