LimitersFW patch281

From kitz wiki
Revision as of 20:54, 21 September 2025 by Chrysalis (talk | contribs) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 can be used to 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
@@ -499,8 +499,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>
@@ -992,24 +992,18 @@
                                                </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('_', '_', $filterent['defaultqueue']);
-                                                                       echo "/<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>";
-                                                               } else if (isset($filterent['defaultqueue'])) {
-                                                                       $desc = str_replace('_', '_', $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('_', '_', $filterent['dnpipe']);
+                                                                       echo "/<a href=\"firewall_shaper_vinterface.php\">{$desc}</a>";
+                                                               } else if (isset($filterent['dnpipe'])) {
+                                                                       $desc = str_replace('_', '_', $filterent['dnpipe']);
+                                                                       echo "<a href=\"firewall_shaper_vinterface.php\">{$desc}</a>";
                                                                } else {
                                                                        echo gettext("none");
                                                                }
                                                        ?>
-                                               </td>
-                                               <td>
-                                                       <?php if ($printicon) { ?>
-                                                               <i class="<?=$image?> <?=$dispcolor?>" title="<?=$alttext;?>"></i>
-                                                       <?php } ?>
-                                                       <?=$schedule_span_begin;?><?=str_replace('_', '_', htmlspecialchars($filterent['sched']));?> <?=$schedule_span_end;?>
                                                </td>
                                                <td>
                                                        <?=htmlspecialchars($filterent['descr']);?>