summaryrefslogtreecommitdiffstats
path: root/test/test_nat44_ed.py
diff options
context:
space:
mode:
authorVladislav Grishenko <themiron@yandex-team.ru>2022-09-05 10:32:46 +0500
committerOle Tr�an <otroan@employees.org>2023-09-13 16:56:19 +0000
commit5b3e04c74f188dbe6c4edab57e555ee3a01fb8f7 (patch)
tree5ea9b2e8252c760c316cb061535d4ae7ab5a51d4 /test/test_nat44_ed.py
parente8a1dbf8da086da24f6bb8ce647e2e898c20df55 (diff)
nat: fix nat44_ed set_session_limit crash
Setting session limit should return error for unknown fib. Optimize max_translations_per_fib expanding and drop unnecessary trailing fib entry. Type: fix Change-Id: Ie7d2b363ade48f53598faa617a49cce7b2db6400 Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Diffstat (limited to 'test/test_nat44_ed.py')
-rw-r--r--test/test_nat44_ed.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test_nat44_ed.py b/test/test_nat44_ed.py
index 323249e4424..d4dd4be5d89 100644
--- a/test/test_nat44_ed.py
+++ b/test/test_nat44_ed.py
@@ -2939,10 +2939,13 @@ class TestNAT44EDMW(TestNAT44ED):
limit = 5
- # 2 interfaces pg0, pg1 (vrf10, limit 1 tcp session)
- # non existing vrf_id makes process core dump
+ # 2 interfaces pg0, pg1 (vrf10, limit 5 tcp sessions)
self.vapi.nat44_set_session_limit(session_limit=limit, vrf_id=10)
+ # expect error when bad is specified
+ with self.vapi.assert_negative_api_retval():
+ self.vapi.nat44_set_session_limit(session_limit=limit, vrf_id=20)
+
self.nat_add_inside_interface(inside)
self.nat_add_inside_interface(inside_vrf10)
self.nat_add_outside_interface(outside)