Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6646: conntrack: in ignore rules, if protocols=all, do not append it to the rule #3981

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/vyos/template.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ def conntrack_rule(rule_conf, rule_id, action, ipv6=False):
else:
for protocol, protocol_config in rule_conf['protocol'].items():
proto = protocol
output.append(f'meta l4proto {proto}')
if proto != 'all':
output.append(f'meta l4proto {proto}')

tcp_flags = dict_search_args(rule_conf, 'tcp', 'flags')
if tcp_flags and action != 'timeout':
Expand Down
1 change: 1 addition & 0 deletions smoketest/scripts/cli/test_system_conntrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ def test_conntrack_ignore(self):

self.cli_set(base_path + ['ignore', 'ipv4', 'rule', '2', 'source', 'address', '192.0.2.1'])
self.cli_set(base_path + ['ignore', 'ipv4', 'rule', '2', 'destination', 'group', 'address-group', address_group])
self.cli_set(base_path + ['ignore', 'ipv4', 'rule', '2', 'protocol', 'all'])

self.cli_set(base_path + ['ignore', 'ipv6', 'rule', '11', 'source', 'address', 'fe80::1'])
self.cli_set(base_path + ['ignore', 'ipv6', 'rule', '11', 'destination', 'address', 'fe80::2'])
Expand Down
Loading