Kitz ADSL Broadband Information
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
 

Difference between revisions of "LimitersFW patch"

From kitz wiki
Jump to: navigation, search
Line 1: Line 1:
 
By default the firewall rules screen will display the configured queue (ALTQ) in the Queue column, if you are using limiters instead (dummynet) which is common to use fq_codel, then this patch will display the configured limiter in that column instead of the queue, new column name Limiter.  In addition to free up space, it also removes the schedule column which is unlikely to be used.
 
By default the firewall rules screen will display the configured queue (ALTQ) in the Queue column, if you are using limiters instead (dummynet) which is common to use fq_codel, then this patch will display the configured limiter in that column instead of the queue, new column name Limiter.  In addition to free up space, it also removes the schedule column which is unlikely to be used.
 +
 +
 +
----
 +
  
 
Paste the below code into the ''Patch Contents'' box.
 
Paste the below code into the ''Patch Contents'' box.

Revision as of 10:41, 5 June 2023

By default the firewall rules screen will display the configured queue (ALTQ) in the Queue column, if you are using limiters instead (dummynet) which is common to use fq_codel, then this patch will display the configured limiter in that column instead of the queue, new column name Limiter. In addition to free up space, it also removes the schedule column which is unlikely to be used.




Paste the below code into the Patch Contents box.

Add a description such as 'Remove schedule and add limiters Firewall UI' in the Description box.

Set Path Strip Count to '0'.

Base Directory to '/usr/local/www/'.

--- firewall_rules.php  2022-09-28 20:57:55.827968000 +0100
+++ firewall_rules.php    2022-09-28 20:55:22.694754000 +0100
@@ -405,8 +405,7 @@
                                                <th><?=gettext("Destination")?></th>
                                                <th><?=gettext("Port")?></th>
                                                <th><?=gettext("Gateway")?></th>
-                                               <th><?=gettext("Queue")?></th>
-                                               <th><?=gettext("Schedule")?></th>
+                                               <th><?=gettext("Limiter")?></th>
                                                <th><?=gettext("Description")?></th>
                                                <th><?=gettext("Actions")?></th>
                                        </tr>
@@ -859,26 +858,20 @@
                                                </td>
                                                <td>
                                                        <?php
-                                                               if (isset($filterent['ackqueue']) && isset($filterent['defaultqueue'])) {
-                                                                       $desc = str_replace('_', ' ', $filterent['ackqueue']);
-                                                                       echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['ackqueue']}&action=show\">{$desc}</a>";
-                                                                       $desc = str_replace('_', '_<wbr>', $filterent['defaultqueue']);
-                                                                       echo "/<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>";
-                                                               } else if (isset($filterent['defaultqueue'])) {
-                                                                       $desc = str_replace('_', '_<wbr>', $filterent['defaultqueue']);
-                                                                       echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>";
+                                                               if (isset($filterent['pdnpipe']) && isset($filterent['dnpipe'])) {
+                                                                       $desc = str_replace('_', ' ', $filterent['pdnpipe']);
+                                                                       echo "<a href=\"firewall_shaper_vinterface.php\">{$desc}</a>";
+                                                                       $desc = str_replace('_', '_<wbr>', $filterent['dnpipe']);
+                                                                       echo "/<a href=\"firewall_shaper_vinterface.php\">{$desc}</a>";
+                                                               } else if (isset($filterent['dnpipe'])) {
+                                                                       $desc = str_replace('_', '_<wbr>', $filterent['dnpipe']);
+                                                                       echo "<a href=\"firewall_shaper_vinterface.php\">{$desc}</a>";
                                                                } else {
                                                                        echo gettext("none");
                                                                }
                                                        ?>
                                                </td>
                                                <td>
-                                                       <?php if ($printicon) { ?>
-                                                               <i class="fa fa-<?=$image?> <?=$dispcolor?>" title="<?=$alttext;?>"></i>
-                                                       <?php } ?>
-                                                       <?=$schedule_span_begin;?><?=str_replace('_', '_<wbr>', htmlspecialchars($filterent['sched']));?> <?=$schedule_span_end;?>
-                                               </td>
-                                               <td>
                                                        <?=htmlspecialchars($filterent['descr']);?>
                                                </td>
                                                <td class="action-icons">,