summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-08-16 14:45:43 +0000
committerErmal <eri@pfsense.org>2013-08-16 14:45:43 +0000
commitd5707d335700b17c25b416de5c0d40190f78d884 (patch)
tree13ed8556c38b04f4c67ebad8e3296578a718e9d3
parent912e3f6fb99d1e82049d24625f27e7315eebb3f1 (diff)
downloadpfsense-d5707d335700b17c25b416de5c0d40190f78d884.zip
pfsense-d5707d335700b17c25b416de5c0d40190f78d884.tar.gz
When using DHCPv6 and only requesting a prefix the communication on the WAN interface will be over link-local so return the link-local address of the interface in this case rather than nothing.
-rw-r--r--etc/inc/interfaces.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 417e988..0f9f289 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -4505,6 +4505,18 @@ 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])) {
+ 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;
OpenPOWER on IntegriCloud