mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Add BGP detection and polling. Fix a lot of other things.
git-svn-id: http://www.observium.org/svn/observer/trunk@161 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -34,7 +34,7 @@ while ($device = mysql_fetch_array($q)) {
|
||||
echo("Create Subnet $network\n");
|
||||
}
|
||||
$network_id = mysql_result(mysql_query("SELECT id from `networks` WHERE `cidr` = '$network'"), 0);
|
||||
if (match_network($nets, $address) && mysql_result(mysql_query("SELECT COUNT(*) FROM `adjacencies` WHERE `network_id` = '$network_id' AND `interface_id` = '$interface_id'"), 0) < '1') {
|
||||
if (match_network($config['nets'], $address) && mysql_result(mysql_query("SELECT COUNT(*) FROM `adjacencies` WHERE `network_id` = '$network_id' AND `interface_id` = '$interface_id'"), 0) < '1') {
|
||||
mysql_query("INSERT INTO `adjacencies` (`network_id`, `interface_id`) VALUES ('$network_id', '$interface_id')");
|
||||
echo("Create Adjacency : $hostname, $interface_id, $network_id, $network, $ifIndex\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user