From 26291b7fcd4427cdde1f78fbb0faee78ce3a374a Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sat, 13 Apr 2019 16:35:28 +0200 Subject: [PATCH] Routing, gateways. make sure we don't return an invalid gateway (property could be set to 'dynamic') in Gateway class, for https://github.com/opnsense/core/issues/2279 --- src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php index 19a39c5e7..a2a0dd439 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php +++ b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php @@ -239,6 +239,8 @@ class Gateways } elseif (self::convertType($ipproto, $ifcfg) != null) { // other predefined types, only bound by interface (e.g. openvpn) $gwkey = $this->newKey($thisconf['priority'], !empty($thisconf['defaultgw'])); + // gateway should only contain a valid address, make sure its empty + unset($thisconf['gateway']); $this->cached_gateways[$gwkey] = $thisconf; } }