From e0498b5c25e7635e0ebefff32a25e489497230f7 Mon Sep 17 00:00:00 2001
From: Viacheslav Hletenko <v.gletenko@vyos.io>
Date: Sun, 2 Jul 2023 20:57:26 +0000
Subject: T5048: QoS do not add prio if it is already in tc command

Prevent duplicatte prio fot tc command
---
 python/vyos/qos/base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/vyos/qos/base.py b/python/vyos/qos/base.py
index afeaaee0b..717e3c214 100644
--- a/python/vyos/qos/base.py
+++ b/python/vyos/qos/base.py
@@ -217,7 +217,7 @@ class QoSBase:
                 if 'match' in cls_config:
                     for index, (match, match_config) in enumerate(cls_config['match'].items(), start=1):
                         filter_cmd = filter_cmd_base
-                        if self.qostype == 'shaper':
+                        if self.qostype == 'shaper' and 'prio ' not in filter_cmd:
                             filter_cmd += f' prio {index}'
                         if 'mark' in match_config:
                             mark = match_config['mark']
-- 
cgit v1.2.3