Project

General

Profile

Actions

Bug #10660

closed

PHP errors in the traffic shaper wizard

Added by Vincent Jansen over 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Low
Category:
Traffic Shaper (ALTQ)
Target version:
Start date:
06/12/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.5-p1
Affected Architecture:

Description

Created a shaper on interface, did not apply, set bandwidth to "100%", clicked apply
Cannot open firewall_shaper.php anymore, just shows error below on fullscreen.
Revert shaper configuration via Backup & Restore solved it.

Cause seemed to be the percentage on the shaper. Perhaps it doesn't support it.
Config below.

Error:

Fatal error: Uncaught Error: Call to undefined method altq_root_queue::GetParent() in /etc/inc/shaper.inc:518 Stack trace: #0 /etc/inc/shaper.inc(1302): get_queue_bandwidth(Object(altq_root_queue)) #1 /etc/inc/shaper.inc(1516): priq_queue->CheckBandwidth(NULL, NULL) #2 /etc/inc/shaper.inc(855): priq_queue->validate_input(Array, NULL) #3 /etc/inc/shaper.inc(5052): altq_root_queue->add_queue('opt1', Array, Array, NULL) #4 /usr/local/www/firewall_shaper.php(46): read_altq_config() #5 {main} thrown in /etc/inc/shaper.inc on line 518 PHP ERROR: Type: 1, File: /etc/inc/shaper.inc, Line: 518, Message: Uncaught Error: Call to undefined method altq_root_queue::GetParent() in /etc/inc/shaper.inc:518 Stack trace: #0 /etc/inc/shaper.inc(1302): get_queue_bandwidth(Object(altq_root_queue)) #1 /etc/inc/shaper.inc(1516): priq_queue->CheckBandwidth(NULL, NULL) #2 /etc/inc/shaper.inc(855): priq_queue->validate_input(Array, NULL) #3 /etc/inc/shaper.inc(5052): altq_root_queue->add_queue('opt1', Array, Array, NULL) #4 /usr/local/www/firewall_shaper.php(46): read_altq_config() #5 {main} thrown

Shaper config:

<shaper>
    <queue>
        <interface>wan</interface>
        <name>wan</name>
        <scheduler>PRIQ</scheduler>
        <bandwidth>9</bandwidth>
        <bandwidthtype>Mb</bandwidthtype>
        <enabled>on</enabled>
        <queue>
            <name>qACK</name>
            <interface>wan</interface>
            <priority>15</priority>
            <enabled>on</enabled>
            <ecn>yes</ecn>
        </queue>
        <queue>
            <name>qDefault</name>
            <interface>wan</interface>
            <priority>0</priority>
            <enabled>on</enabled>
            <default>default</default>
            <ecn>yes</ecn>
            <codel>yes</codel>
        </queue>
    </queue>
    <queue>
        <interface>lan</interface>
        <name>lan</name>
        <scheduler>PRIQ</scheduler>
        <bandwidth>90</bandwidth>
        <bandwidthtype>Mb</bandwidthtype>
        <enabled>on</enabled>
        <queue>
            <name>qLink</name>
            <interface>lan</interface>
            <qlimit>500</qlimit>
            <priority>0</priority>
            <enabled>on</enabled>
            <default>default</default>
            <ecn>yes</ecn>
            <codel>yes</codel>
        </queue>
        <queue>
            <name>qACK</name>
            <interface>lan</interface>
            <priority>15</priority>
            <enabled>on</enabled>
            <ecn>yes</ecn>
        </queue>
    </queue>
    <queue>
        <name>opt1</name>
        <interface>opt1</interface>
        <scheduler>PRIQ</scheduler>
        <queue>
            <name>qDefault</name>
            <interface>opt1</interface>
            <qlimit></qlimit>
            <priority>0</priority>
            <description></description>
            <enabled>on</enabled>
            <default>default</default>
            <codel>yes</codel>
            <ecn>yes</ecn>
        </queue>
        <queue>
            <name>qACK</name>
            <interface>opt1</interface>
            <priority>15</priority>
            <enabled>on</enabled>
            <ecn>yes</ecn>
        </queue>
        <bandwidth>100</bandwidth>
        <bandwidthtype>%</bandwidthtype>
        <enabled>on</enabled>
    </queue>
    <queue>
        <name>opt2</name>
        <interface>opt2</interface>
        <scheduler>PRIQ</scheduler>
        <queue>
            <name>qDefault</name>
            <interface>opt2</interface>
            <qlimit></qlimit>
            <priority>0</priority>
            <description></description>
            <enabled>on</enabled>
            <default>default</default>
            <codel>yes</codel>
            <ecn>yes</ecn>
        </queue>
        <queue>
            <name>qACK</name>
            <interface>opt2</interface>
            <qlimit></qlimit>
            <priority>15</priority>
            <description></description>
            <enabled>on</enabled>
            <ecn>yes</ecn>
        </queue>
    </queue>
</shaper>

Actions

Also available in: Atom PDF