diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-03-20 19:41:13 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-03-20 19:45:56 +0100 |
| commit | 1903920c2b5622ba5b5089859ec66413c2497a3a (patch) | |
| tree | 1084b0fde45fd4da0f8592fc573ceaa0ad2c42da /src/conf_mode/service_https.py | |
| parent | fc06cc45148a42171baf9f4ae01da33c3f0df1aa (diff) | |
| download | vyos-1x-1903920c2b5622ba5b5089859ec66413c2497a3a.tar.gz vyos-1x-1903920c2b5622ba5b5089859ec66413c2497a3a.zip | |
configverify: T8413: fix issue in duplex shaping (redirect to input interface)
After commit 6eafdbf1a8 ("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.
Diffstat (limited to 'src/conf_mode/service_https.py')
0 files changed, 0 insertions, 0 deletions
