mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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.
This commit is contained in:
parent
ebcbc110d0
commit
f253e9281f
@ -4805,6 +4805,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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user