After commit rVYOSONEX6eafdbf1a8e1 (configdict: T8358: rename internal representation from traffic_policy to qos) we uncovered a bug/added a feature in supporting QoS and redirect on an interface.
The code in VyOS stream 2026.02 is:
if ('mirror' in config or 'redirect' in config) and dict_search('traffic_policy.in', config) is not None:
and this got changed to:
if 'qos' in config and ('mirror' in config or 'redirect' in config):
in the commit mentioned above
When looking at the code in 2026.02 release
# git describe --tags
2026.02
# git grep traffic_policy
python/vyos/configdict.py: dict.update({'traffic_policy': {}})
python/vyos/configdict.py: dict['vif'][vif].update({'traffic_policy': {}})
python/vyos/configdict.py: dict['vif_s'][vif_s].update({'traffic_policy': {}})
python/vyos/configdict.py: dict['vif_s'][vif_s]['vif_c'][vif_c].update({'traffic_policy': {}})
python/vyos/configverify.py: if ('mirror' in config or 'redirect' in config) and dict_search('traffic_policy.in', config) is not None:
python/vyos/ifconfig/interface.py: if not 'traffic_policy' in self.config:I never see traffic_policy.in set, so the check seems to have never worked in the past at all
During the QoS rewrite from 1.3 -> 1.4 CLI traffic-policy was renamed by me to qos but we kept that synthetic key in the Python code. That is the root cause. So it should have never worked (CLI wise) but during that bug it started to work as expected, and even the Python code stated in a comment:
if 'qos' in config and ('mirror' in config or 'redirect' in config):
# XXX: support combination of limiting and redirect/mirror - this is an artificial limitation
raise ConfigError('Can not use QoS together with mirror/redirect!')So we have enabled this feature for a long time by accident already.