session: fix crash during client detach
[vpp.git] / test / test_srv6_ad.py
index a788f1e..dad7c18 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import unittest
 import binascii
@@ -16,26 +16,24 @@ from scapy.layers.l2 import Ether, Dot1Q
 from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
 from scapy.layers.inet import IP, UDP
 
-from scapy.utils import inet_pton, inet_ntop
-
 from util import ppp
 
 
-class TestSRv6(VppTestCase):
+class TestSRv6Ad(VppTestCase):
     """ SRv6 Dynamic Proxy plugin Test Case """
 
     @classmethod
     def setUpClass(self):
-        super(TestSRv6, self).setUpClass()
+        super(TestSRv6Ad, self).setUpClass()
 
     @classmethod
     def tearDownClass(cls):
-        super(TestSRv6, cls).tearDownClass()
+        super(TestSRv6Ad, cls).tearDownClass()
 
     def setUp(self):
         """ Perform test setup before each test case.
         """
-        super(TestSRv6, self).setUp()
+        super(TestSRv6Ad, self).setUp()
 
         # packet sizes, inclusive L2 overhead
         self.pg_packet_sizes = [64, 512, 1518, 9018]
@@ -48,7 +46,7 @@ class TestSRv6(VppTestCase):
         """
         self.teardown_interfaces()
 
-        super(TestSRv6, self).tearDown()
+        super(TestSRv6Ad, self).tearDown()
 
     def configure_interface(self,
                             interface,
@@ -117,7 +115,7 @@ class TestSRv6(VppTestCase):
         if any(ipv6):
             self.logger.debug(self.vapi.cli("show ip6 neighbors"))
         if any(ipv4):
-            self.logger.debug(self.vapi.cli("show ip arp"))
+            self.logger.debug(self.vapi.cli("show ip4 neighbors"))
         self.logger.debug(self.vapi.cli("show interface"))
         self.logger.debug(self.vapi.cli("show hardware"))
 
@@ -151,8 +149,7 @@ class TestSRv6(VppTestCase):
         route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
                            [VppRoutePath(self.pg0.remote_ip6,
                                          self.pg0.sw_if_index,
-                                         proto=DpoProto.DPO_PROTO_IP6)],
-                           is_ip6=1)
+                                         proto=DpoProto.DPO_PROTO_IP6)])
         route.add_vpp_config()
 
         # configure SRv6 localSID behavior
@@ -286,8 +283,7 @@ class TestSRv6(VppTestCase):
         route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
                            [VppRoutePath(self.pg0.remote_ip6,
                                          self.pg0.sw_if_index,
-                                         proto=DpoProto.DPO_PROTO_IP6)],
-                           is_ip6=1)
+                                         proto=DpoProto.DPO_PROTO_IP6)])
         route.add_vpp_config()
 
         # configure SRv6 localSID behavior
@@ -429,8 +425,7 @@ class TestSRv6(VppTestCase):
         route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
                            [VppRoutePath(self.pg0.remote_ip6,
                                          self.pg0.sw_if_index,
-                                         proto=DpoProto.DPO_PROTO_IP6)],
-                           is_ip6=1)
+                                         proto=DpoProto.DPO_PROTO_IP6)])
         route.add_vpp_config()
 
         # configure SRv6 localSID behavior
@@ -723,7 +718,7 @@ class TestSRv6(VppTestCase):
 
         p = IPv6(src=srcaddr, dst=sidlist[segleft]) / \
             IPv6ExtHdrSegmentRouting(addresses=sidlist,
-                                     segleft=segleft, nh=59) / \
+                                     segleft=segleft, nh=143) / \
             eth
         return p