summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-21 09:48:40 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-21 09:48:40 -0200
commit633c02c1ac86dcd10e52e87e68e5ca757990b6e8 (patch)
tree82ad5c26357c472af34af312f6dc66352a779db9 /etc
parent473129bbc3ddcb6011f2dd9a736addabe1db8acc (diff)
downloadpfsense-633c02c1ac86dcd10e52e87e68e5ca757990b6e8.zip
pfsense-633c02c1ac86dcd10e52e87e68e5ca757990b6e8.tar.gz
Previous attempt to fix #1995 allow to set more than one default queues, prevent it with this change. It should fix #1995
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/shaper.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index cec5157..aa7831e 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -985,7 +985,8 @@ class priq_queue {
$input_errors[] = "Queue names must be alphanumeric and _ or - only.";
if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['name']))
$input_errors[] = "Queue names must be alphanumeric and _ or - only.";
- if (!empty($data['default']) && altq_get_default_queue($data['interface']) && ($data['name'] != $this->GetQName()))
+ $default = $this->GetDefault();
+ if (!empty($data['default']) && altq_get_default_queue($data['interface']) && empty($default))
$input_errors[] = "Only one default queue per interface is allowed.";
}
OpenPOWER on IntegriCloud