Add also a special case so the correct ip is returned for the case when WAN is v4 PPP type and v6 is DHCP but with option fetch v6 info from v4.

This commit is contained in:
Ermal 2013-08-16 15:00:41 +00:00
parent d5707d3357
commit f299990792

View File

@ -4510,6 +4510,15 @@ function get_interface_ipv6($interface = "wan", $flush = false) {
* the communication on WAN will be done over link-local.
*/
if (is_array($config['interfaces'][$interface])) {
switch ($config['interfaces'][$interface]['ipaddr']) {
case 'pppoe':
case 'l2tp':
case 'pptp':
case 'ppp':
if ($config['interfaces'][$interface]['ipaddrv6'] == 'dhcp6')
$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 != "::"))