Changeset 188 for trunk/system/generators/traffic_shaping_routerboard.php
- Timestamp:
- Apr 5, 2009, 5:06:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/traffic_shaping_routerboard.php
r187 r188 44 44 while($Subnet = $DbResult->fetch_assoc()) 45 45 { 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; 48 50 } 49 51 … … 73 75 $Commands[] = ' /queue tree add name='.$Member['Name'].'-in limit-at='.$SpeedOut.' max-limit='.$UserMaxSpeedOut.' parent=main-in queue=wireless-default'; 74 76 75 $DbResult2 = $Database->select('hosts', 'COUNT(*)', '(block = 0) AND (MAC != "") AND (user = '.$Member['Id'].')');77 $DbResult2 = $Database->select('hosts', 'COUNT(*)', '(block = 0) AND (MAC != "")'); 76 78 $Row = $DbResult2->fetch_array(); 77 79 $HostCount = $Row[0];
Note:
See TracChangeset
for help on using the changeset viewer.