summaryrefslogtreecommitdiff
path: root/python/vyos/firewall.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-27 15:10:57 +0100
committerGitHub <noreply@github.com>2022-01-27 15:10:57 +0100
commite2924920618b9d6a6b933ebcb3c36b98669f9f32 (patch)
treed15117473ec376f3b5c8f681573fc9e16a3c0f72 /python/vyos/firewall.py
parentf5a29d46656651035a9f53b5a12ee99ee7c1d704 (diff)
parentdcabea5919e299cdee9db7469b451356743cc7ff (diff)
downloadvyos-1x-e2924920618b9d6a6b933ebcb3c36b98669f9f32.tar.gz
vyos-1x-e2924920618b9d6a6b933ebcb3c36b98669f9f32.zip
Merge pull request #1193 from sarthurdev/T4178
firewall: T4178: Fix tcp flags output when `not` isn't used
Diffstat (limited to 'python/vyos/firewall.py')
-rw-r--r--python/vyos/firewall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index 808e90e38..4993d855e 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -190,8 +190,8 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name):
def parse_tcp_flags(flags):
include = [flag for flag in flags if flag != 'not']
- all_flags = include + [flag for flag in flags['not']] if 'not' in flags else []
- return f'tcp flags & ({"|".join(all_flags)}) == {"|".join(include)}'
+ exclude = flags['not'].keys() if 'not' in flags else []
+ return f'tcp flags & ({"|".join(include + exclude)}) == {"|".join(include)}'
def parse_time(time):
out = []