Ignore:
Timestamp:
Apr 5, 2009, 5:06:25 PM (16 years ago)
Author:
george
Message:
  • Opraveno: Generování nastavení routerů.
File:
1 edited

Legend:

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

    r187 r188  
    4444while($Subnet = $DbResult->fetch_assoc())
    4545{
    46   $Commands[] = ' /ip firewall mangle add chain=inet-out src-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' out-interface='.$InetInterface.' action=jump jump-target=inet-out-'.$Subnet['Id'];
    47   $Commands[] = ' /ip firewall mangle add chain=inet-in dst-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' in-interface='.$InetInterface.' action=jump jump-target=inet-in-'.$Subnet['Id'];
     46  $SubnetParts = explode('.', $Subnet['AddressRange']);
     47  $SubnetNumber = $SubnetParts[2];
     48  $Commands[] = ' /ip firewall mangle add chain=inet-out src-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' out-interface='.$InetInterface.' action=jump jump-target=inet-out-'.$SubnetNumber;
     49  $Commands[] = ' /ip firewall mangle add chain=inet-in dst-address='.$Subnet['AddressRange'].'/'.$Subnet['Mask'].' in-interface='.$InetInterface.' action=jump jump-target=inet-in-'.$SubnetNumber;
    4850}
    4951
     
    7375  $Commands[] = ' /queue tree add name='.$Member['Name'].'-in limit-at='.$SpeedOut.' max-limit='.$UserMaxSpeedOut.' parent=main-in queue=wireless-default';
    7476
    75   $DbResult2 = $Database->select('hosts', 'COUNT(*)', '(block = 0) AND (MAC != "") AND (user = '.$Member['Id'].')');
     77  $DbResult2 = $Database->select('hosts', 'COUNT(*)', '(block = 0) AND (MAC != "")');
    7678  $Row = $DbResult2->fetch_array();
    7779  $HostCount = $Row[0];
Note: See TracChangeset for help on using the changeset viewer.