diff --git a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php index 8c52b607b..a852349ea 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php +++ b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php @@ -98,7 +98,8 @@ class Plugin $proto = 'inet'; foreach ($gwgr as $gw) { if (Util::isIpAddress($gw['gwip']) && !empty($gw['int'])) { - $routeto[] = str_repeat("( {$gw['int']} {$gw['gwip']} )", $gw['weight']); + $gwweight = empty($gw['weight']) ? 1 : $gw['weight']; + $routeto[] = str_repeat("( {$gw['int']} {$gw['gwip']} )", $gwweight); if (strstr($gw['gwip'], ':')) { $proto = 'inet6'; }