geneve: Fix the byte swapping for the VNI
[vpp.git] / test / template_bd.py
index b0d508f..198cc22 100644 (file)
@@ -1,9 +1,10 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import abc
 import six
 
-from scapy.layers.l2 import Ether, Raw
+from scapy.layers.l2 import Ether
+from scapy.packet import Raw
 from scapy.layers.inet import IP, UDP
 
 from util import ip4_range
@@ -73,7 +74,7 @@ class BridgeDomain(object):
         """
 
         encapsulated_pkt = self.encapsulate(self.frame_request,
-                                            self.single_tunnel_bd)
+                                            self.single_tunnel_vni)
 
         self.pg0.add_stream([encapsulated_pkt, ])
 
@@ -98,10 +99,10 @@ class BridgeDomain(object):
 
         self.pg_start()
 
-        # Pick first received frame and check if it's corectly encapsulated.
+        # Pick first received frame and check if it's correctly encapsulated.
         out = self.pg0.get_capture(1)
         pkt = out[0]
-        self.check_encapsulation(pkt, self.single_tunnel_bd)
+        self.check_encapsulation(pkt, self.single_tunnel_vni)
 
         payload = self.decapsulate(pkt)
         self.assert_eq_pkts(payload, self.frame_reply)
@@ -117,7 +118,7 @@ class BridgeDomain(object):
 
         self.pg_start()
 
-        # Get packet from each tunnel and assert it's corectly encapsulated.
+        # Get packet from each tunnel and assert it's correctly encapsulated.
         out = self.pg0.get_capture(self.n_ucast_tunnels)
         for pkt in out:
             self.check_encapsulation(pkt, self.ucast_flood_bd, True)
@@ -135,7 +136,7 @@ class BridgeDomain(object):
 
         self.pg_start()
 
-        # Pick first received frame and check if it's corectly encapsulated.
+        # Pick first received frame and check if it's correctly encapsulated.
         out = self.pg0.get_capture(1)
         pkt = out[0]
         self.check_encapsulation(pkt, self.mcast_flood_bd,