Skip to content

Commit

Permalink
Do not try to discover reserved IP addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska committed Jun 17, 2024
1 parent eed1ea8 commit 8a86d2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SnmpDiscoveryCollector.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ protected function LoadAllIPAddresses(): void
$aIPv4Addresses = static::LoadIPAddresses('IPv4Address', sprintf(<<<SQL
SELECT IPv4Address AS a
JOIN IPv4Subnet AS s ON a.subnet_id = s.id
WHERE s.snmpdiscovery_id = %d
WHERE s.snmpdiscovery_id = %d AND a.status != 'reserved'
SQL, $this->iApplicationID));

// Load IPv6 addresses to discover
$aIPv6Addresses = static::LoadIPAddresses('IPv6Address', sprintf(<<<SQL
SELECT IPv6Address AS a
JOIN IPv6Subnet AS s ON a.subnet_id = s.id
WHERE s.snmpdiscovery_id = %d
WHERE s.snmpdiscovery_id = %d AND a.status != 'reserved'
SQL, $this->iApplicationID));

$this->aIPAddresses = $aIPv4Addresses + $aIPv6Addresses;
Expand Down

0 comments on commit 8a86d2d

Please sign in to comment.