X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_neighbor.py;h=1dfae241faf0a0ebd1f356bf89d9443840e948ee;hb=b3b2de71ceea0cc7ce18f89cc8180ed4a42e355d;hp=2ce0a6353869bb41c90ac847214981cf497f77da;hpb=8082380922c65702251d5242058f7b5f35011574;p=vpp.git diff --git a/test/test_neighbor.py b/test/test_neighbor.py index 2ce0a635386..1dfae241faf 100644 --- a/test/test_neighbor.py +++ b/test/test_neighbor.py @@ -5,7 +5,7 @@ from socket import AF_INET, AF_INET6, inet_pton from framework import VppTestCase, VppTestRunner from vpp_neighbor import VppNeighbor, find_nbr -from vpp_ip_route import VppIpRoute, VppRoutePath +from vpp_ip_route import VppIpRoute, VppRoutePath, find_route from scapy.packet import Raw from scapy.layers.l2 import Ether, ARP @@ -115,7 +115,7 @@ class ARPTestCase(VppTestCase): # # Generate some hosts on the LAN # - self.pg1.generate_remote_hosts(4) + self.pg1.generate_remote_hosts(5) # # Send IP traffic to one of these unresolved hosts. @@ -301,6 +301,25 @@ class ARPTestCase(VppTestCase): "ARP req for non-local source") # + # A neighbor entry that has no associated FIB-entry + # + arp_no_fib = VppNeighbor(self, + self.pg1.sw_if_index, + self.pg1.remote_hosts[4].mac, + self.pg1.remote_hosts[4].ip4, + is_no_fib_entry=1) + arp_no_fib.add_vpp_config() + + # + # check we have the neighbor, but no route + # + self.assertTrue(find_nbr(self, + self.pg1.sw_if_index, + self.pg1._remote_hosts[4].ip4)) + self.assertFalse(find_route(self, + self.pg1._remote_hosts[4].ip4, + 32)) + # # cleanup # dyn_arp.remove_vpp_config()