aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_neighbor.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-03-08 05:17:22 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-09 15:34:14 +0000
commitb3b2de71ceea0cc7ce18f89cc8180ed4a42e355d (patch)
treeda9a025096839fef6d749459c28f786327226d13 /test/test_neighbor.py
parent8082380922c65702251d5242058f7b5f35011574 (diff)
IMplementation for option to not create a FIB table entry when adding a neighbor entry
Change-Id: I952039e101031ee6a06e63f4c73d8eb359423e1a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_neighbor.py')
-rw-r--r--test/test_neighbor.py23
1 files changed, 21 insertions, 2 deletions
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()