summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_firewall.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-03-10 21:22:46 +0100
committerGitHub <noreply@github.com>2023-03-10 21:22:46 +0100
commit5d4908288931c9c319eb428e99a35f8dc4a7b9d6 (patch)
tree5349f494b8534cd3ace8e97d4d208da78de6a406 /smoketest/scripts/cli/test_firewall.py
parentfe82d86d3e87cb8d92ebc9d0652c08e3dd79a12c (diff)
parent16c494c2f1364283988b52e35faf6b01745bbed4 (diff)
downloadvyos-1x-5d4908288931c9c319eb428e99a35f8dc4a7b9d6.tar.gz
vyos-1x-5d4908288931c9c319eb428e99a35f8dc4a7b9d6.zip
Merge pull request #1871 from nicolas-fort/T5055
T5055: Firewall: add packet-type matcher in firewall and route policy
Diffstat (limited to 'smoketest/scripts/cli/test_firewall.py')
-rwxr-xr-xsmoketest/scripts/cli/test_firewall.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_firewall.py b/smoketest/scripts/cli/test_firewall.py
index 41ba633d9..d61534d87 100755
--- a/smoketest/scripts/cli/test_firewall.py
+++ b/smoketest/scripts/cli/test_firewall.py
@@ -227,10 +227,12 @@ class TestFirewall(VyOSUnitTestSHIM.TestCase):
self.cli_set(['firewall', 'name', name, 'rule', '4', 'destination', 'port', '22'])
self.cli_set(['firewall', 'name', name, 'rule', '4', 'recent', 'count', '10'])
self.cli_set(['firewall', 'name', name, 'rule', '4', 'recent', 'time', 'minute'])
+ self.cli_set(['firewall', 'name', name, 'rule', '4', 'packet-type', 'host'])
self.cli_set(['firewall', 'name', name, 'rule', '5', 'action', 'accept'])
self.cli_set(['firewall', 'name', name, 'rule', '5', 'protocol', 'tcp'])
self.cli_set(['firewall', 'name', name, 'rule', '5', 'tcp', 'flags', 'syn'])
self.cli_set(['firewall', 'name', name, 'rule', '5', 'tcp', 'mss', mss_range])
+ self.cli_set(['firewall', 'name', name, 'rule', '5', 'packet-type', 'broadcast'])
self.cli_set(['firewall', 'name', name, 'rule', '5', 'inbound-interface', 'interface-name', interface])
self.cli_set(['firewall', 'name', name, 'rule', '6', 'action', 'return'])
self.cli_set(['firewall', 'name', name, 'rule', '6', 'protocol', 'gre'])
@@ -249,8 +251,8 @@ class TestFirewall(VyOSUnitTestSHIM.TestCase):
['tcp flags syn / syn,ack', 'tcp dport 8888', 'log prefix "[smoketest-2-R]" level err', 'ip ttl > 102', 'reject'],
['tcp dport 22', 'limit rate 5/minute', 'return'],
['log prefix "[smoketest-default-D]"','smoketest default-action', 'drop'],
- ['tcp dport 22', 'add @RECENT_smoketest_4 { ip saddr limit rate over 10/minute burst 10 packets }', 'drop'],
- ['tcp flags & syn == syn', f'tcp option maxseg size {mss_range}', f'iifname "{interface}"'],
+ ['tcp dport 22', 'add @RECENT_smoketest_4 { ip saddr limit rate over 10/minute burst 10 packets }', 'meta pkttype host', 'drop'],
+ ['tcp flags & syn == syn', f'tcp option maxseg size {mss_range}', f'iifname "{interface}"', 'meta pkttype broadcast'],
['meta l4proto gre', f'oifname "{interface}"', f'ct mark {mark_hex}', 'return']
]