Revision 23d9f686
Added by Renato Botelho over 11 years ago
etc/inc/gwlb.inc | ||
---|---|---|
372 | 372 |
$interfaces_v4 = array(); |
373 | 373 |
$interfaces_v6 = array(); |
374 | 374 |
|
375 |
$i = 0;
|
|
375 |
$i = -1;
|
|
376 | 376 |
/* Process/add all the configured gateways. */ |
377 | 377 |
if (is_array($config['gateways']['gateway_item'])) { |
378 | 378 |
foreach ($config['gateways']['gateway_item'] as $gateway) { |
379 |
/* Increment it here to do not skip items */ |
|
380 |
$i++; |
|
381 |
|
|
379 | 382 |
if (empty($config['interfaces'][$gateway['interface']])) |
380 | 383 |
continue; |
381 | 384 |
$wancfg = $config['interfaces'][$gateway['interface']]; |
... | ... | |
445 | 448 |
$gateway['attribute'] = $i; |
446 | 449 |
|
447 | 450 |
$gateways_arr[$gateway['name']] = $gateway; |
448 |
$i++; |
|
449 | 451 |
} |
450 | 452 |
} |
451 | 453 |
unset($gateway); |
Also available in: Unified diff
Fix an issue that changes wrong gateway entry when items are hidden