fixed gateway count variable

This commit is contained in:
2021-11-30 17:32:14 -05:00
parent 098289d92c
commit bcef1c947d

View File

@@ -119,13 +119,13 @@ $config['interfaces'][$wanInterface]['ipaddr'] = $wanStaticIP;
$config['interfaces'][$wanInterface]['subnet'] = $wanStaticIPSubnet;
$config['interfaces'][$wanInterface]['gateway'] = $gatewayName;
$gwCount = count($config['gateways']['gateway_item']);
$config['gateways']['gateway_item'][$count]['gateway'] = $gatewayIP;
$config['gateways']['gateway_item'][$count]['interface'] = $interface;
$config['gateways']['gateway_item'][$count]['name'] = $gatewayName;
$config['gateways']['gateway_item'][$count]['ipprotocol'] = 'inet';
$config['gateways']['gateway_item'][$count]['monitor_dsiable'] = 1;
$config['gateways']['gateway_item'][$count]['defaultgw'] = 1;
$config['gateways']['gateway_item'][$count]['fargw'] = 1;
$config['gateways']['gateway_item'][$gwCount]['gateway'] = $gatewayIP;
$config['gateways']['gateway_item'][$gwCount]['interface'] = $interface;
$config['gateways']['gateway_item'][$gwCount]['name'] = $gatewayName;
$config['gateways']['gateway_item'][$gwCount]['ipprotocol'] = 'inet';
$config['gateways']['gateway_item'][$gwCount]['monitor_dsiable'] = 1;
$config['gateways']['gateway_item'][$gwCount]['defaultgw'] = 1;
$config['gateways']['gateway_item'][$gwCount]['fargw'] = 1;
# Loop through outbound nat
foreach ($config['nat']['outbound']['rule'] as $i => $rule) {