mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
filter, gw weight can not be 0 (imported config?)
This commit is contained in:
parent
de39b3b44d
commit
4d2e84072c
@ -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';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user