Mercurial > stress-tester
changeset 1282:636f73c0cb9f
DpdkUnidirectionalRawPacketWorker - bugfix
author | Devel 1 |
---|---|
date | Thu, 09 Jul 2020 14:14:36 +0200 |
parents | b181731fc098 |
children | da1afebf57ef |
files | stress-tester/src/main/java/com/passus/st/emitter/raw/DpdkUnidirectionalRawPacketWorker.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/emitter/raw/DpdkUnidirectionalRawPacketWorker.java Thu Jul 09 11:39:10 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/emitter/raw/DpdkUnidirectionalRawPacketWorker.java Thu Jul 09 14:14:36 2020 +0200 @@ -157,7 +157,9 @@ protected int doWrite0(UnidirectionalRawPacketChannelContext<DpdkAO> channelContext, byte[] frame, int length) throws IOException { if (bufferSize > 0) { synchronized (this) { - bufferBytes[bufferPkts] = frame; + byte[] copy = new byte[length]; + System.arraycopy(frame, 0, copy, 0, length); + bufferBytes[bufferPkts] = copy; bufferLengths[bufferPkts] = length; bufferPkts++; if (bufferPkts == bufferSize) {