diff --git a/html/pages/device.inc.php b/html/pages/device.inc.php index 99fcd78da8..642fc6ae05 100644 --- a/html/pages/device.inc.php +++ b/html/pages/device.inc.php @@ -118,7 +118,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) $device_routing_count['bgp'] = dbFetchCell("SELECT COUNT(*) FROM `bgpPeers` WHERE `device_id` = ?", array($device['device_id'])); if ($device_routing_count['bgp']) { $routing_tabs[] = 'bgp'; } - $device_routing_count['ospf'] = dbFetchCell("SELECT COUNT(*) FROM `ospf_ports` WHERE `device_id` = ?", array($device['device_id'])); + $device_routing_count['ospf'] = dbFetchCell("SELECT COUNT(*) FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'"); if ($device_routing_count['ospf']) { $routing_tabs[] = 'ospf'; } $device_routing_count['cef'] = dbFetchCell("SELECT COUNT(*) FROM `cef_switching` WHERE `device_id` = ?", array($device['device_id'])); diff --git a/html/pages/routing/ospf.inc.php b/html/pages/routing/ospf.inc.php index fc5b75676b..b8b8c4023c 100644 --- a/html/pages/routing/ospf.inc.php +++ b/html/pages/routing/ospf.inc.php @@ -29,7 +29,7 @@ foreach (dbFetchRows("SELECT * FROM `ospf_instances` WHERE `ospfAdminStat` = 'en if ($instance['ospfASBdrRtrStatus'] == "true") { $asbr = 'yes'; } else { $asbr = 'no'; } echo(''); - echo(' '.generate_device_link($device, 0, "routing/ospf/"). ''); + echo(' '.generate_device_link($device, 0, array('tab' => 'routing', 'proto' => 'ospf')). ''); echo(' '.$instance['ospfRouterId'] . ''); echo(' ' . $enabled . ''); echo(' ' . $abr . '');