nat: fix ICMP checksum validation
[vpp.git] / test / test_neighbor.py
index 241479a..b33a70b 100644 (file)
@@ -4,6 +4,7 @@ import unittest
 import os
 from socket import AF_INET, AF_INET6, inet_pton
 
+from framework import tag_fixme_vpp_workers
 from framework import VppTestCase, VppTestRunner
 from vpp_neighbor import VppNeighbor, find_nbr
 from vpp_ip_route import VppIpRoute, VppRoutePath, find_route, \
@@ -82,6 +83,7 @@ class ARPTestCase(VppTestCase):
         ether = rx[Ether]
         self.assertEqual(ether.dst, "ff:ff:ff:ff:ff:ff")
         self.assertEqual(ether.src, smac)
+        self.assertEqual(ether.type, 0x0806)
 
         arp = rx[ARP]
         self.assertEqual(arp.hwtype, 1)
@@ -98,6 +100,7 @@ class ARPTestCase(VppTestCase):
         ether = rx[Ether]
         self.assertEqual(ether.dst, dmac)
         self.assertEqual(ether.src, smac)
+        self.assertEqual(ether.type, 0x0806)
 
         arp = rx[ARP]
         self.assertEqual(arp.hwtype, 1)
@@ -132,6 +135,7 @@ class ARPTestCase(VppTestCase):
         ether = rx[Ether]
         self.assertEqual(ether.dst, dmac)
         self.assertEqual(ether.src, smac)
+        self.assertEqual(ether.type, 0x0800)
 
         ip = rx[IP]
         self.assertEqual(ip.src, sip)
@@ -141,6 +145,7 @@ class ARPTestCase(VppTestCase):
         ether = rx[Ether]
         self.assertEqual(ether.dst, dmac)
         self.assertEqual(ether.src, smac)
+        self.assertEqual(ether.type, 0x8847)
 
         mpls = rx[MPLS]
         self.assertTrue(mpls.label, label)
@@ -1806,11 +1811,25 @@ class ARPTestCase(VppTestCase):
                                 "10.0.1.2",
                                 "10.0.1.128")
 
+        # apply a connected prefix to an interface in a different table
+        VppIpRoute(self, "10.0.1.0", 24,
+                   [VppRoutePath("0.0.0.0",
+                                 self.pg1.sw_if_index)],
+                   table_id=1).add_vpp_config()
+
+        rxs = self.send_and_expect(self.pg3, [p2], self.pg1)
+        for rx in rxs:
+            self.verify_arp_req(rx,
+                                self.pg1.local_mac,
+                                "10.0.1.2",
+                                "10.0.1.128")
+
         # cleanup
         conn3.remove_vpp_config()
         conn2.remove_vpp_config()
 
 
+@tag_fixme_vpp_workers
 class NeighborStatsTestCase(VppTestCase):
     """ ARP/ND Counters """