X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_nat.py;h=773eb51d4ee5a6e63b815708c8d949a30fe32d0f;hb=ecd1fc7dfa6a36d1774f71093380b3548a22346b;hp=a6786218bd3517f84285748c5bdbbfcd469a9008;hpb=9f1b3ff308ff823f95f694342ef65c06686f5bf8;p=vpp.git diff --git a/test/test_nat.py b/test/test_nat.py index a6786218bd3..773eb51d4ee 100644 --- a/test/test_nat.py +++ b/test/test_nat.py @@ -3670,10 +3670,22 @@ class TestNAT44(MethodHolder): sw_if_index=self.pg1.sw_if_index, is_add=1) + reas_cfg1 = self.vapi.nat_get_reass() + # this test was intermittently failing in some cases + # until we temporarily bump the reassembly timeouts + self.vapi.nat_set_reass(timeout=20, max_reass=1024, max_frag=5, + drop_frag=0) + self.frag_in_order(proto=IP_PROTOS.tcp) self.frag_in_order(proto=IP_PROTOS.udp) self.frag_in_order(proto=IP_PROTOS.icmp) + # restore the reassembly timeouts + self.vapi.nat_set_reass(timeout=reas_cfg1.ip4_timeout, + max_reass=reas_cfg1.ip4_max_reass, + max_frag=reas_cfg1.ip4_max_frag, + drop_frag=reas_cfg1.ip4_drop_frag) + def test_frag_forwarding(self): """ NAT44 forwarding fragment test """ self.vapi.nat44_add_del_interface_addr( @@ -4514,7 +4526,17 @@ class TestNAT44EndpointDependent(MethodHolder): sw_if_index=self.pg1.sw_if_index, is_add=1) self.vapi.nat44_forwarding_enable_disable(enable=True) + reas_cfg1 = self.vapi.nat_get_reass() + # this test was intermittently failing in some cases + # until we temporarily bump the reassembly timeouts + self.vapi.nat_set_reass(timeout=20, max_reass=1024, max_frag=5, + drop_frag=0) self.frag_in_order(proto=IP_PROTOS.tcp, dont_translate=True) + # restore the reassembly timeouts + self.vapi.nat_set_reass(timeout=reas_cfg1.ip4_timeout, + max_reass=reas_cfg1.ip4_max_reass, + max_frag=reas_cfg1.ip4_max_frag, + drop_frag=reas_cfg1.ip4_drop_frag) def test_frag_out_of_order(self): """ NAT44 translate fragments arriving out of order """