Ignore:
Timestamp:
Jan 24, 2010, 9:21:28 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Výpočet IP rozsahu u generování nastavení sítě.
File:
1 edited

Legend:

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

    r275 r276  
    44include('../../global.php');
    55include('../routerboard.php');
     6include('common.php');
    67$Path = array('tool', 'netwatch');
    78
     
    1718  foreach($List as $Properties)
    1819  {
    19     $NewAddress = new NetworkAddressIPv4();
    20     $NewAddress->AddressFromString($Subnet['AddressRange']);
    21     $NewAddress->Prefix = $Subnet['Mask'];
    22     if($NewAddress->Contain($Properties['host']))
     20    $SubnetAddress = new NetworkAddressIPv4();
     21    $SubnetAddress->AddressFromString($Subnet['AddressRange']);
     22    $SubnetAddress->Prefix = $Subnet['Mask'];
     23    $Address = new NetworkAddressIPv4();
     24    $Address->AddressFromString($Properties['host']);
     25    $Address->Prefix = 32;
     26    if($SubnetAddress->Contain($Address))
    2327    {
    2428      //echo($Properties['host'].', ');
Note: See TracChangeset for help on using the changeset viewer.