aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-01-17 10:01:52 +0000
committerDamjan Marion <dmarion@me.com>2020-01-27 19:21:50 +0000
commit4d39f9c61c48d033ed5c9f729bdc975b58da29e8 (patch)
treecaff60ba612ab49838b08c0317e56455ce8b91ca /test
parent6f090fa1fa44bb2de0565bbedb2756e37ea35040 (diff)
bfd: reset peer discriminator on timeout
More RFC compliance. Ticket: VPP-1816 BFD: peer discriminator not reset on timeout Type: fix Change-Id: I68063c18097d282b3527e3fb485c1d0d1fd1b0c8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_bfd.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_bfd.py b/test/test_bfd.py
index 6dc58b933db..e78ad0c4064 100644
--- a/test/test_bfd.py
+++ b/test/test_bfd.py
@@ -819,6 +819,16 @@ class BFD4TestCase(VppTestCase):
e = self.vapi.wait_for_event(1, "bfd_udp_session_details")
verify_event(self, e, expected_state=BFDState.down)
+ def test_peer_discr_reset_sess_down(self):
+ """ peer discriminator reset after session goes down """
+ bfd_session_up(self)
+ detection_time = self.test_session.detect_mult *\
+ self.vpp_session.required_min_rx / USEC_IN_SEC
+ self.sleep(detection_time, "waiting for BFD session time-out")
+ self.test_session.my_discriminator = 0
+ wait_for_bfd_packet(self,
+ pcap_time_min=time.time() - self.vpp_clock_offset)
+
def test_large_required_min_rx(self):
""" large remote required min rx interval """
bfd_session_up(self)
@@ -2100,6 +2110,7 @@ class BFDSHA1TestCase(VppTestCase):
self.test_session.vpp_seq_number = None
# now throw away any pending packets
self.pg0.enable_capture()
+ self.test_session.my_discriminator = 0
bfd_session_up(self)