aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_vxlan.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_vxlan.py')
-rw-r--r--test/test_vxlan.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_vxlan.py b/test/test_vxlan.py
index ac435852..1978cf0c 100644
--- a/test/test_vxlan.py
+++ b/test/test_vxlan.py
@@ -6,7 +6,7 @@ from template_bd import BridgeDomain
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
-from scapy_handlers.vxlan import VXLAN
+from scapy.layers.vxlan import VXLAN
class TestVxlan(BridgeDomain, VppTestCase):
@@ -24,13 +24,15 @@ class TestVxlan(BridgeDomain, VppTestCase):
return (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) /
IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) /
UDP(sport=self.dport, dport=self.dport, chksum=0) /
- VXLAN(vni=self.vni) /
+ VXLAN(vni=self.vni, flags=self.flags) /
pkt)
def decapsulate(self, pkt):
"""
Decapsulate the original payload frame by removing VXLAN header
"""
+ # check if is set I flag
+ self.assertEqual(pkt[VXLAN].flags, int('0x8', 16))
return pkt[VXLAN].payload
# Method for checking VXLAN encapsulation.
@@ -62,6 +64,7 @@ class TestVxlan(BridgeDomain, VppTestCase):
try:
cls.dport = 4789
+ cls.flags = 0x8
cls.vni = 1
# Create 2 pg interfaces.
@@ -95,5 +98,6 @@ class TestVxlan(BridgeDomain, VppTestCase):
if not self.vpp_dead:
self.logger.info(self.vapi.cli("show bridge-domain 1 detail"))
+
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)