- Timestamp:
- Dec 29, 2011, 10:07:45 PM (13 years ago)
- Location:
- trunk/system/generators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/dhcp.php
r301 r334 20 20 $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM `NetworkInterface` LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE '. 21 21 ' CompareNetworkPrefix(INET_ATON(LocalIP), INET_ATON("'.$Subnet['AddressRange'].'"), '.$Subnet['Mask'].') AND (`MAC` != "00:00:00:00:00:00") ORDER BY `LocalIP`'); 22 echo($Database->error);22 //echo($Database->error); 23 23 while($Interface = $DbResult2->fetch_assoc()) 24 24 { -
trunk/system/generators/firewall_mangle.php
r317 r334 20 20 21 21 // Generate address tree 22 $AddressTree = array('Address' => new NetworkAddressIPv4(), 'Name' => 'main', 'Items' => array() );22 $AddressTree = array('Address' => new NetworkAddressIPv4(), 'Name' => 'main', 'Items' => array(), 'ForceMark' => false); 23 23 24 24 // Divide rules by subnet number … … 80 80 foreach($Node['Items'] as $Index => $Item) 81 81 { 82 if( (count($Item['Items']) == 0) or ($Item['ForceMark'] == true))82 if(count($Item['Items']) == 0) 83 83 { 84 84 // Hosts … … 107 107 } 108 108 } 109 if($Node['ForceMark'] == true) 110 { 111 // Mark member subnets 112 $ParentSubnetId = GetSubgroupByRange($Node['Address']->AddressToString().'/'.$Node['Address']->Prefix); 113 114 $PacketMark = GetMarkByComment($Node['Name'].'-out'); 115 $ItemsFirewall[] = array('chain' => 'inet-'.$ParentSubnetId.'-out', 'src-address' => $Address, 'out-interface' => $InetInterface, 'action' => 'mark-packet', 'new-packet-mark' => $PacketMark, 'passthrough' => 'no', 'comment' => $Node['Name'].'-all-out'); 116 $PacketMark = GetMarkByComment($Node['Name'].'-in'); 117 $ItemsFirewall[] = array('chain' => 'inet-'.$ParentSubnetId.'-in', 'dst-address' => $Address, 'in-interface' => $InetInterface, 'action' => 'mark-packet', 'new-packet-mark' => $PacketMark, 'passthrough' => 'no', 'comment' => $Node['Name'].'-all-in'); 118 } 109 119 } 110 120
Note:
See TracChangeset
for help on using the changeset viewer.