From 732b5ff4c8ebb69724e7b47d771b2b15e6a123db Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 1 Aug 2019 20:46:50 +0200 Subject: [PATCH] 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 --- src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php index 7183ecaba..eb3fc288d 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php +++ b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php @@ -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']);