Skip to content

Commit eca79f4

Browse files
author
Emil Gustafsson
committed
update IPv6NeighborDiscoveryService
Signed-off-by: Emil Gustafsson <[email protected]>
1 parent 2c243ff commit eca79f4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/com/cisco/trex/stateless/IPv6NeighborDiscoveryService.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public EthernetPacket sendIcmpV6Echo(
141141
public EthernetPacket sendIcmpV6Echo(
142142
int portIdx, String srcMac, String dstIp, int icmpId, int icmpSeq, int timeOut) {
143143
Map<String, EthernetPacket> stringEthernetPacketMap =
144-
sendNSandIcmpV6Req(portIdx, timeOut, dstIp);
144+
sendNSandIcmpV6Req(portIdx, timeOut, srcMac, dstIp);
145145

146146
Optional<Map.Entry<String, EthernetPacket>> icmpMulticastResponse =
147147
stringEthernetPacketMap.entrySet().stream().findFirst();
@@ -232,12 +232,9 @@ public EthernetPacket sendNeighborSolicitation(
232232
}
233233

234234
private Map<String, EthernetPacket> sendNSandIcmpV6Req(
235-
int portIdx, int timeDuration, String dstIp) {
235+
int portIdx, int timeDuration, String srcMac, String dstIp) {
236236
long endTs = System.currentTimeMillis() + timeDuration * 1000;
237237
TRexClientResult<PortStatus> portStatusResult = tRexClient.getPortStatus(portIdx);
238-
PortStatus portStatus = portStatusResult.get();
239-
240-
String srcMac = portStatus.getAttr().getLayerConiguration().getL2Configuration().getSrc();
241238

242239
Packet pingPkt = buildICMPV6EchoReq(null, srcMac, null, dstIp);
243240
Packet icmpv6NSPkt =

0 commit comments

Comments
 (0)