diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-01-27 13:12:39 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-01-27 13:12:39 +0100 |
commit | dcabea5919e299cdee9db7469b451356743cc7ff (patch) | |
tree | d15117473ec376f3b5c8f681573fc9e16a3c0f72 /python | |
parent | f5a29d46656651035a9f53b5a12ee99ee7c1d704 (diff) | |
download | vyos-1x-dcabea5919e299cdee9db7469b451356743cc7ff.tar.gz vyos-1x-dcabea5919e299cdee9db7469b451356743cc7ff.zip |
firewall: T4178: Fix tcp flags output when `not` isn't used
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/firewall.py | 4 |
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 = [] |