summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-30 01:42:48 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-30 01:42:48 -0500
commitf5ba05cbeee0631beee2db37d4ed74eadde7020e (patch)
tree4c4635cbdf4eba74620ad7083ff2dcfa800ed7c9 /src
parent84a67bf406f0d2ca1ee7cdc9a0f45366a9886ecd (diff)
parent6a53de6f7e4d94a67bfdc482f347a475ef1b747f (diff)
downloadpfsense-f5ba05cbeee0631beee2db37d4ed74eadde7020e.zip
pfsense-f5ba05cbeee0631beee2db37d4ed74eadde7020e.tar.gz
Merge pull request #2764 from NewEraCracker/redmine-6011
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/auth.inc3
-rw-r--r--src/etc/inc/interfaces.inc4
-rw-r--r--src/etc/inc/util.inc4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc
index 942a34d..9e2cded 100644
--- a/src/etc/inc/auth.inc
+++ b/src/etc/inc/auth.inc
@@ -205,8 +205,9 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][
break;
}
}
- $interface_list_ipv6s = get_configured_ipv6_addresses();
+ $interface_list_ipv6s = get_configured_ipv6_addresses(true);
foreach ($interface_list_ipv6s as $ilipv6s) {
+ $ilipv6s = explode('%', $ilipv6s)[0];
if (strcasecmp($referrer_host, $ilipv6s) == 0) {
$found_host = true;
break;
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 9b99d06..d5abe0d 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -5383,7 +5383,7 @@ function get_interface_ip($interface = "wan") {
}
}
-function get_interface_ipv6($interface = "wan", $flush = false) {
+function get_interface_ipv6($interface = "wan", $flush = false, $linklocal_fallback = false) {
global $config;
if (substr($interface, 0, 4) == '_vip') {
@@ -5432,7 +5432,7 @@ function get_interface_ipv6($interface = "wan", $flush = false) {
* NOTE: On the case when only the prefix is requested,
* the communication on WAN will be done over link-local.
*/
- if (is_array($config['interfaces'][$interface]) && isset($config['interfaces'][$interface]['dhcp6prefixonly'])) {
+ if ($linklocal_fallback || (is_array($config['interfaces'][$interface]) && isset($config['interfaces'][$interface]['dhcp6prefixonly']))) {
$curip = find_interface_ipv6_ll($realif, $flush);
if ($curip && is_ipaddrv6($curip) && ($curip != "::")) {
return $curip;
diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc
index e19f5b5..d41a79b 100644
--- a/src/etc/inc/util.inc
+++ b/src/etc/inc/util.inc
@@ -1459,13 +1459,13 @@ function get_configured_ip_addresses() {
* IPv6 addresses.
*
*/
-function get_configured_ipv6_addresses() {
+function get_configured_ipv6_addresses($linklocal_fallback = false) {
require_once("interfaces.inc");
$ipv6_array = array();
$interfaces = get_configured_interface_list();
if (is_array($interfaces)) {
foreach ($interfaces as $int) {
- $ipaddrv6 = get_interface_ipv6($int);
+ $ipaddrv6 = get_interface_ipv6($int, false, $linklocal_fallback);
$ipv6_array[$int] = $ipaddrv6;
}
}
OpenPOWER on IntegriCloud