From b80973d0e9f7aa266b079ebb04758c2c3dec4531 Mon Sep 17 00:00:00 2001 From: l0crian1 Date: Wed, 21 May 2025 11:47:34 -0400 Subject: 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. --- src/conf_mode/qos.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3