summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorl0crian1 <ryan.claridge13@gmail.com>2025-05-21 11:47:34 -0400
committerl0crian1 <ryan.claridge13@gmail.com>2025-05-21 11:47:34 -0400
commitb80973d0e9f7aa266b079ebb04758c2c3dec4531 (patch)
tree283bb1a5eda961a907325692755231b333e3c84c /src
parent0e58ab45a6e1db0495cf7c66e66b89220d0d6069 (diff)
downloadvyos-1x-b80973d0e9f7aa266b079ebb04758c2c3dec4531.tar.gz
vyos-1x-b80973d0e9f7aa266b079ebb04758c2c3dec4531.zip
T7415: Fix tcp flags matching
Empty leaf nodes are cleaned, causing the tcp ack and syn flags to not match. These values are exempted from being cleaned.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/qos.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/qos.py b/src/conf_mode/qos.py
index 59e307a39..aed9407de 100755
--- a/src/conf_mode/qos.py
+++ b/src/conf_mode/qos.py
@@ -85,7 +85,13 @@ def _clean_conf_dict(conf):
}
"""
if isinstance(conf, dict):
- return {node: _clean_conf_dict(val) for node, val in conf.items() if val != {} and _clean_conf_dict(val) != {}}
+ preserve_empty_nodes = {'syn', 'ack'}
+
+ return {
+ node: _clean_conf_dict(val)
+ for node, val in conf.items()
+ if (val != {} and _clean_conf_dict(val) != {}) or node in preserve_empty_nodes
+ }
else:
return conf