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'])) {