Skip to content

Commit 8e78b8e

Browse files
Merge pull request #92 from cisco-system-traffic-generator/ipv6ns-option
add service mode check
2 parents 514474c + 0e275da commit 8e78b8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,12 @@ public EthernetPacket sendIcmpV6Echo(
172172
return icmpUnicastReply;
173173
}
174174

175-
public EthernetPacket sendNeighborSolicitation(int portIdx, int timeout, String dstIp) {
175+
public EthernetPacket sendNeighborSolicitation(int portIdx, int timeout, String dstIp)
176+
throws ServiceModeRequiredException {
176177
PortStatus portStatus = tRexClient.getPortStatus(portIdx).get();
178+
if (!portStatus.getService()) {
179+
throw new ServiceModeRequiredException();
180+
}
177181
String srcMac = portStatus.getAttr().getLayerConiguration().getL2Configuration().getSrc();
178182
return sendNeighborSolicitation(portIdx, timeout, srcMac, dstIp);
179183
}

0 commit comments

Comments
 (0)