From e8a6717c9d456f7ef4c1a0667ac4ac35f3bea34b Mon Sep 17 00:00:00 2001 From: kkr0kk <35397392+kkr0kk@users.noreply.github.com> Date: Fri, 11 Jan 2019 17:41:33 +0100 Subject: [PATCH] Update gwlb.inc Correct BUG 9004 -> set the default gateway when system start and a gateway_group is default IPV4 gateway (cherry picked from commit 67dd34a0996c14fdfeb1823e07fb3c82748d3794) --- src/etc/inc/gwlb.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index 0b803217dd..ef368e272a 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -1109,7 +1109,7 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) { $currentdefaultgwip = getcurrentdefaultgatewayip($ipprotocol); $found_current = false; foreach($gwg_members as $gwgroupitem) { - if ($gwgroupitem['gwip'] == $currentdefaultgwip) { + if (!empty($currentdefaultgwip) AND $gwgroupitem['gwip'] == $currentdefaultgwip) { $set_dfltgwname = $gwgroupitem['gw']; $found_current = true; if (isset($config['system']['gw-debug'])) {