summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-21 09:45:13 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-21 09:45:36 -0200
commitf8dca5a36e63e095f6e0e22e71ec1a1444097814 (patch)
tree1f1ddc19c972f11f0b5b396f99f0f659aaad8135
parentcb2bd7ff05a4588cf743ae04c76e14df9bba0312 (diff)
downloadpfsense-f8dca5a36e63e095f6e0e22e71ec1a1444097814.zip
pfsense-f8dca5a36e63e095f6e0e22e71ec1a1444097814.tar.gz
Previous attempt to fix #1995 allow to set more than one default queues, prevent it with this change. It should fix #1995
-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 7d37e15..e2b1317 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -986,7 +986,8 @@ class priq_queue {
$input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
if (!empty($data['name']) && !preg_match("/^[a-zA-Z0-9_-]*$/", $data['name']))
$input_errors[] = gettext("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[] = gettext("Only one default queue per interface is allowed.");
}
OpenPOWER on IntegriCloud