diff options
author | Neale Ranns <neale@graphiant.com> | 2022-02-17 09:08:47 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-03-04 16:14:11 +0000 |
commit | 5c6dd17a373a2c56e57f02426d66a79af7faa19c (patch) | |
tree | 154930db914285fda1636eb47faef2b1275e0190 /test/test_ip6.py | |
parent | bc91e86674d446e024a957318d42a3bbd3280bf1 (diff) |
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 <neale@graphiant.com>
Change-Id: I4a0b791cde8c941a9bf37de6aa5da56779d3cef4
Diffstat (limited to 'test/test_ip6.py')
-rw-r--r-- | test/test_ip6.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/test_ip6.py b/test/test_ip6.py index 2c318cdaf99..bac50a3df98 100644 --- a/test/test_ip6.py +++ b/test/test_ip6.py @@ -2599,12 +2599,14 @@ class TestIP6Input(VppTestCase): inet6.UDP(sport=1234, dport=1234) / Raw(b'\xa5' * 100)) - rx = self.send_and_expect(self.pg0, p_version * NUM_PKTS, self.pg0) - rx = rx[0] - icmp = rx[ICMPv6TimeExceeded] + rxs = self.send_and_expect_some(self.pg0, + p_version * NUM_PKTS, + self.pg0) - # 0: "hop limit exceeded in transit", - self.assertEqual((icmp.type, icmp.code), (3, 0)) + for rx in rxs: + icmp = rx[ICMPv6TimeExceeded] + # 0: "hop limit exceeded in transit", + self.assertEqual((icmp.type, icmp.code), (3, 0)) icmpv6_data = '\x0a' * 18 all_0s = "::" |