Gateways, IPv6. dynamic gateways without a valid address should have been added to the list, empty($thisconf['dynamic']) doesn't exist in this scope, hence we replace this with the proper ipv6 check.

This unhides ipv6 gateways which didn't receive an address via rtsold
This commit is contained in:
Ad Schellevis 2019-08-01 20:46:50 +02:00
parent 6836a9caf0
commit 732b5ff4c8

View File

@ -245,7 +245,9 @@ class Gateways
// gateway should only contain a valid address, make sure its empty
unset($thisconf['gateway']);
$this->cached_gateways[$gwkey] = $thisconf;
} elseif (empty($thisconf['dynamic'])) {
} elseif ($ipproto == 'inet6'
&& in_array($ifcfg['ipaddrv6'], array('slaac', 'dhcp6', '6to4', '6rd'))) {
// Dynamic IPv6 interface, but no router solicit response received using rtsold.
$gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw']));
// gateway should only contain a valid address, make sure its empty
unset($thisconf['gateway']);