diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-01-21 09:45:13 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-01-21 09:45:36 -0200 |
commit | f8dca5a36e63e095f6e0e22e71ec1a1444097814 (patch) | |
tree | 1f1ddc19c972f11f0b5b396f99f0f659aaad8135 /etc/inc | |
parent | cb2bd7ff05a4588cf743ae04c76e14df9bba0312 (diff) | |
download | pfsense-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
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/shaper.inc | 3 |
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."); } |