diff options
author | Neale Ranns <nranns@cisco.com> | 2018-09-07 01:48:54 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-09-07 11:16:14 +0000 |
commit | 3b93be5d76cbcb5dc3d3aee5c72a797014a346f9 (patch) | |
tree | 6c8706c9b518ee09ccdee790296e1759c5f78c76 /test/test_ip4.py | |
parent | c84cbad785fa11c1dba92b8e87ad234d779d1cbd (diff) |
IP route update fix when multipath and drop set
Change-Id: I9cec7486cb6e3c5261d74d2b15a4d19469285a30
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_ip4.py')
-rw-r--r-- | test/test_ip4.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py index d15453d4f33..02a31be830a 100644 --- a/test/test_ip4.py +++ b/test/test_ip4.py @@ -552,7 +552,7 @@ class TestIPNull(VppTestCase): super(TestIPNull, self).setUp() # create 2 pg interfaces - self.create_pg_interfaces(range(1)) + self.create_pg_interfaces(range(2)) for i in self.pg_interfaces: i.admin_up() @@ -624,6 +624,32 @@ class TestIPNull(VppTestCase): self.assertEqual(icmp.src, self.pg0.remote_ip4) self.assertEqual(icmp.dst, "10.0.0.2") + def test_ip_drop(self): + """ IP Drop Routes """ + + p = (Ether(src=self.pg0.remote_mac, + dst=self.pg0.local_mac) / + IP(src=self.pg0.remote_ip4, dst="1.1.1.1") / + UDP(sport=1234, dport=1234) / + Raw('\xa5' * 100)) + + r1 = VppIpRoute(self, "1.1.1.0", 24, + [VppRoutePath(self.pg1.remote_ip4, + self.pg1.sw_if_index)]) + r1.add_vpp_config() + + rx = self.send_and_expect(self.pg0, p * 65, self.pg1) + + # + # insert a more specific as a drop + # + r2 = VppIpRoute(self, "1.1.1.1", 32, [], is_drop=1) + r2.add_vpp_config() + + self.send_and_assert_no_replies(self.pg0, p * 65, "Drop Route") + r2.remove_vpp_config() + rx = self.send_and_expect(self.pg0, p * 65, self.pg1) + class TestIPDisabled(VppTestCase): """ IPv4 disabled """ |