Mercurial > stress-tester
changeset 1073:2d7ad6c35a8b
bugfixes
author | Devel 2 |
---|---|
date | Tue, 28 Apr 2020 15:07:06 +0200 |
parents | 0cafeaef7e1f |
children | a5236d71d2ca |
files | stress-tester/src/main/java/com/passus/st/emitter/raw/UdpFrameTemplate.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/emitter/raw/UdpFrameTemplate.java Tue Apr 28 13:51:31 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/emitter/raw/UdpFrameTemplate.java Tue Apr 28 15:07:06 2020 +0200 @@ -43,11 +43,11 @@ DataUtils.writeInt2(frame, ipv4Offset + 2, length + IPV4_HEADER_LENGTH + UDP_HEADER_LENGTH); DataUtils.writeInt2(frame, udpOffset + 4, length + UDP_HEADER_LENGTH); - int ipv4CheckSum = calcIp4Checksum(frame); + int ipv4CheckSum = calcIp4Checksum(frame, ipv4Offset); DataUtils.writeInt2(frame, ipv4Offset + 10, ipv4CheckSum); System.arraycopy(payload, 0, frame, payloadOffset, payloadLength); - length = payloadLength + headerLength; + this.length = payloadLength + headerLength; } }