From 5c6dd17a373a2c56e57f02426d66a79af7faa19c Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 17 Feb 2022 09:08:47 +0000 Subject: ip: rate-limit the sending of ICMP error messages Type: improvement For error conditions, such as TTL expired, dest unreach, etc, Rate limit the sending of ICMP error messages. The rate limiting is done based on src,dst IP address of the received packet. the rate limit has been chosen, somewhat arbitrarily, to be 1e-3. This is the same limit as the ARP throttling. Signed-off-by: Neale Ranns Change-Id: I4a0b791cde8c941a9bf37de6aa5da56779d3cef4 --- test/test_punt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_punt.py') diff --git a/test/test_punt.py b/test/test_punt.py index 3471a3f7dd5..ac059e904bd 100644 --- a/test/test_punt.py +++ b/test/test_punt.py @@ -305,7 +305,7 @@ class TestIP4PuntSocket(TestPuntSocket): # # expect ICMP - port unreachable for all packets # - rx = self.send_and_expect(self.pg0, pkts, self.pg0) + rx = self.send_and_expect_some(self.pg0, pkts, self.pg0) for p in rx: self.assertEqual(int(p[IP].proto), 1) # ICMP @@ -334,7 +334,7 @@ class TestIP4PuntSocket(TestPuntSocket): punts = self.vapi.punt_socket_dump(type=pt_l4) self.assertEqual(len(punts), 0) - rx = self.send_and_expect(self.pg0, pkts, self.pg0) + rx = self.send_and_expect_some(self.pg0, pkts, self.pg0) for p in rx: self.assertEqual(int(p[IP].proto), 1) # ICMP self.assertEqual(int(p[ICMP].code), 3) # unreachable -- cgit 1.2.3-korg