diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go b/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go index 00523b126ad..18aa9c2689c 100644 --- a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go +++ b/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/packetin_test.go @@ -202,7 +202,7 @@ func testPacketIn(ctx context.Context, t *testing.T, args *testArgs, isIPv4 bool if etherType != layers.EthernetTypeIPv4 && etherType != layers.EthernetTypeIPv6 { continue } - if !strings.EqualFold(srcMAC, atePort1.MAC) { + if !strings.EqualFold(srcMAC, tracerouteSrcMAC) { continue } if wantPacket.TTL != nil { diff --git a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go b/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go index 68d9ae13228..c4c81908bcc 100644 --- a/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go +++ b/feature/experimental/p4rt/otg_tests/traceroute_packetin_test/traceroute_packetin_test.go @@ -41,6 +41,7 @@ import ( var ( p4InfoFile = flag.String("p4info_file_location", "../../wbb.p4info.pb.txt", "Path to the p4info file.") streamName = "p4rt" + tracerouteSrcMAC = "00:01:00:02:00:03" deviceID = uint64(1) portId = uint32(10) electionId = uint64(100) @@ -347,7 +348,7 @@ func (traceroute *TraceroutePacketIO) GetTrafficFlow(ate *ondatra.ATEDevice, dst flow := gosnappi.NewFlow() flow.SetName("IP4") ethHeader := flow.Packet().Add().Ethernet() - ethHeader.Src().SetValue(atePort1.MAC) + ethHeader.Src().SetValue(tracerouteSrcMAC) ethHeader.Dst().SetValue(dstMac) ipHeader := flow.Packet().Add().Ipv4() ipHeader.Src().SetValue(atePort1.IPv4) @@ -361,7 +362,7 @@ func (traceroute *TraceroutePacketIO) GetTrafficFlow(ate *ondatra.ATEDevice, dst flow := gosnappi.NewFlow() flow.SetName("IP6") ethHeader := flow.Packet().Add().Ethernet() - ethHeader.Src().SetValue(atePort1.MAC) + ethHeader.Src().SetValue(tracerouteSrcMAC) ethHeader.Dst().SetValue(dstMac) ipv6Header := flow.Packet().Add().Ipv6() ipv6Header.Src().SetValue(atePort1.IPv6)