summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2021-10-13 19:16:07 +0200
committerBeno�t Ganne <bganne@cisco.com>2022-03-08 18:16:03 +0000
commit7fc0ee7f65fbbced6e987f8bfd927a595b7ff7ee (patch)
tree1625e1e5e289184748caa481bceffa586ef270ef /test
parent26fec718f2fa7913a484008fca7b1bc015c6efb5 (diff)
classify: add API to retrieve punt ACL tables
Type: feature Change-Id: Ica3e60836c0f26518ba2c238a8c03ce3648ea69b Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_classifier.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_classifier.py b/test/test_classifier.py
index 74851f92377..9f0fdbf587a 100644
--- a/test/test_classifier.py
+++ b/test/test_classifier.py
@@ -915,10 +915,20 @@ class TestClassifierPunt(TestClassifier):
proto=socket.IPPROTO_UDP, src_port=sport))
self.send_and_expect_only(self.pg0, pkts, self.pg1)
+ # test dump api: ip4 is set, ip6 is not
+ r = self.vapi.punt_acl_get()
+ self.assertEqual(r.ip4_table_index, table_index)
+ self.assertEqual(r.ip6_table_index, 0xffffffff)
+
# cleanup
self.acl_active_table = ''
self.vapi.punt_acl_add_del(ip4_table_index=table_index, is_add=0)
+ # test dump api: nothing set
+ r = self.vapi.punt_acl_get()
+ self.assertEqual(r.ip4_table_index, 0xffffffff)
+ self.assertEqual(r.ip6_table_index, 0xffffffff)
+
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)