Ignore:
Timestamp:
Sep 28, 2009, 2:11:05 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Podpora CIDR pro generování netwatch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/netwatch.php

    r248 r250  
    2323    $I = explode('.', $Subnet['AddressRange']);
    2424    $I = $I[2];
    25     $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE (NetworkInterface.LocalIP LIKE "192.168.'.$I.'.%") AND (NetworkDevice.Used = 1) ORDER BY NetworkInterface.LocalIP');
     25    $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE CompareNetworkPrefix(INET_ATON(LocalIP), INET_ATON("'.$Subnet['AddressRange'].'"), '.$Subnet['Mask'].') AND (NetworkDevice.Used = 1) ORDER BY NetworkInterface.LocalIP');
    2626    while($Interface = $DbResult2->fetch_assoc())
    2727    {
Note: See TracChangeset for help on using the changeset viewer.