Commit 4169afd1 authored by Ad Schellevis's avatar Ad Schellevis

(gwlb.inc) ipprotocol should be stored in gateway_item

parent 4f58e7f8
......@@ -667,14 +667,6 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
}
$gateway['dynamic'] = true;
}
} else {
/* getting this detection right is hard at this point because we still don't
* store the address family in the gateway item */
if (is_ipaddrv4($gateway['gateway'])) {
$gateway['ipprotocol'] = "inet";
} elseif (is_ipaddrv6($gateway['gateway'])) {
$gateway['ipprotocol'] = "inet6";
}
}
if (isset($gateway['monitor_disable'])) {
......@@ -694,12 +686,8 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
/* entry has a default flag, use it */
if (isset($gateway['defaultgw'])) {
if ($gateway['ipprotocol'] == "inet") {
$gateway['defaultgw'] = true;
} elseif ($gateway['ipprotocol'] == "inet6") {
$gateway['defaultgw'] = true;
}
}
/* include the gateway index as the attribute */
$gateway['attribute'] = $i++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment