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 67dd34a099)
This commit is contained in:
kkr0kk 2019-01-11 17:41:33 +01:00 committed by Renato Botelho
parent 2944e2f700
commit e8a6717c9d

View File

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