summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsongyanchao <[email protected]>2024-04-14 13:24:41 +0800
committersongyanchao <[email protected]>2024-04-17 02:23:06 +0000
commit5a83f0d644a8564791c531d82a79e1aa4899f882 (patch)
tree5093a72b84233bd58baad5480edcdc61feab2f83 /test
parent0077eda5753ba103b891a3e91b3816e6d772c966 (diff)
🐞 fix: Constructed the source port for VXLAN encapsulation.
Constructed the source port for VXLAN encapsulation.
Diffstat (limited to 'test')
-rw-r--r--test/ptf_test/etherfabric_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ptf_test/etherfabric_test.py b/test/ptf_test/etherfabric_test.py
index b76ec0d..b5a8f75 100644
--- a/test/ptf_test/etherfabric_test.py
+++ b/test/ptf_test/etherfabric_test.py
@@ -5,6 +5,8 @@ from scapy.all import *
from mrzcpd import Mrzcpd
from common_pkt import *
+import ptf.mask as mask
+
conf_for_virtual_wire_mode = """
[device]
device=veth0
@@ -362,9 +364,13 @@ class IPv4TestForRouteCtx(BaseTest):
send_pkt = simple_vxlan_packet(
eth_src='0a:0a:0a:0a:01:28', eth_dst='10:70:fd:03:c0:bd',
ip_src='10.254.50.1', ip_dst='10.254.60.1',udp_sport=4789,udp_dport=4789, vxlan_vni=32)
- verify_pkt = simple_vxlan_packet(
+ vxlan_pkt = simple_vxlan_packet(
eth_src='10:70:fd:03:c0:bd', eth_dst='0a:0a:0a:0a:01:28',
ip_src='10.254.60.1', ip_dst='10.254.50.1',udp_sport=4789,udp_dport=4789,with_udp_chksum=False,vxlan_flags=0,vxlan_vni=32)
+
+ verify_pkt = mask.Mask(vxlan_pkt)
+ verify_pkt.set_do_not_care_scapy(UDP, "sport")
+
send_packet(self, 0, send_pkt)
verify_packets(self, verify_pkt, [0])
finally: