From bfca97e2e0d821e3e9ad38833fd99f4a302bee83 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Sun, 14 Apr 2019 14:41:21 +0200 Subject: [PATCH] Routing, gateways. minor regression in getDefaultGW() we should only return a gateway with an address as default here. for https://github.com/opnsense/core/issues/2279 --- src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php | 3 ++- 1 file changed, 2 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 8532ea8da..55a7e20f1 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php +++ b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php @@ -266,8 +266,9 @@ class Gateways continue; } elseif (!empty($gateway['disabled'])) { continue; + } elseif (!empty($gateway['gateway'])) { + return $gateway; } - return $gateway; } } // not found