From f2999907925296e186326ffc41d461b6800a37b1 Mon Sep 17 00:00:00 2001 From: Ermal Date: Fri, 16 Aug 2013 15:00:41 +0000 Subject: [PATCH] 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. --- etc/inc/interfaces.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 0f9f289303..85b7476067 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -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 != "::"))