Commit 05a55a40 authored by Ad Schellevis's avatar Ad Schellevis

cleanup traffic shaper

parent f89ab7ff
...@@ -2965,7 +2965,8 @@ class dnpipe_class extends dummynet_class { ...@@ -2965,7 +2965,8 @@ class dnpipe_class extends dummynet_class {
foreach ($this->subqueues as $q) foreach ($this->subqueues as $q)
$q->delete_queue(); $q->delete_queue();
unset_dn_object_by_reference($this->GetLink()); unset_dn_object_by_reference($this->GetLink());
@pfSense_pipe_action("pipe delete " . $this->GetNumber()); // TODO: re-enable after kernel fix for dummynet
// @pfSense_pipe_action("pipe delete " . $this->GetNumber());
} }
function GetBandwidth() { function GetBandwidth() {
return $this->qbandwidth; return $this->qbandwidth;
...@@ -3509,7 +3510,8 @@ class dnqueue_class extends dummynet_class { ...@@ -3509,7 +3510,8 @@ class dnqueue_class extends dummynet_class {
function delete_queue() { function delete_queue() {
cleanup_dnqueue_from_rules($this->GetQname()); cleanup_dnqueue_from_rules($this->GetQname());
unset_dn_object_by_reference($this->GetLink()); unset_dn_object_by_reference($this->GetLink());
@pfSense_pipe_action("queue delete " . $this->GetNumber()); // TODO: re-enable after kernel fix for dummynet
// @pfSense_pipe_action("queue delete " . $this->GetNumber());
} }
function validate_input($data, &$input_errors) { function validate_input($data, &$input_errors) {
......
...@@ -48,24 +48,30 @@ read_dummynet_config(); ...@@ -48,24 +48,30 @@ read_dummynet_config();
*/ */
if ($_GET) { if ($_GET) {
if ($_GET['queue']) if (isset($_GET['queue'])) {
$qname = htmlspecialchars(trim($_GET['queue'])); $qname = htmlspecialchars(trim($_GET['queue']));
if ($_GET['pipe']) }
if (isset($_GET['pipe'])) {
$pipe = htmlspecialchars(trim($_GET['pipe'])); $pipe = htmlspecialchars(trim($_GET['pipe']));
if ($_GET['action']) }
if (isset($_GET['action'])) {
$action = htmlspecialchars($_GET['action']); $action = htmlspecialchars($_GET['action']);
}
} }
if ($_POST) { if ($_POST) {
if ($_POST['name']) if (isset($_POST['name'])) {
$qname = htmlspecialchars(trim($_POST['name'])); $qname = htmlspecialchars(trim($_POST['name']));
else if ($_POST['newname']) } else if (isset($_POST['newname'])) {
$qname = htmlspecialchars(trim($_POST['newname'])); $qname = htmlspecialchars(trim($_POST['newname']));
if ($_POST['pipe']) }
if (isset($_POST['pipe'])) {
$pipe = htmlspecialchars(trim($_POST['pipe'])); $pipe = htmlspecialchars(trim($_POST['pipe']));
else } else {
$pipe = htmlspecialchars(trim($qname)); $pipe = htmlspecialchars(trim($qname));
if ($_POST['parentqueue']) }
if (isset($_POST['parentqueue'])) {
$parentqueue = htmlspecialchars(trim($_POST['parentqueue'])); $parentqueue = htmlspecialchars(trim($_POST['parentqueue']));
}
} }
if ($pipe) { if ($pipe) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment