diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index c2425a0..8c4c45a 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -4852,10 +4852,6 @@ function get_interface_ipv6($interface = "wan", $flush = false) { return null; } - /* - * 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])) { switch ($config['interfaces'][$interface]['ipaddr']) { case 'pppoe': @@ -4866,18 +4862,24 @@ function get_interface_ipv6($interface = "wan", $flush = false) { $realif = get_real_interface($interface, "inet6", true); break; } - if (isset($config['interfaces'][$interface]['dhcp6prefixonly'])) { - $curip = find_interface_ipv6_ll($realif, $flush); - if ($curip && is_ipaddrv6($curip) && ($curip != "::")) - return $curip; - } } $curip = find_interface_ipv6($realif, $flush); if ($curip && is_ipaddrv6($curip) && ($curip != "::")) return $curip; - else - return null; + else { + /* + * 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'])) { + $curip = find_interface_ipv6_ll($realif, $flush); + if ($curip && is_ipaddrv6($curip) && ($curip != "::")) { + return $curip; + } + } + } + return null; } function get_interface_linklocal($interface = "wan") { |