Bugfix: A calculated UDP checksum of 0 should be set as 0xFFFF in the frame as per RFC 768. A checksum value of 0 in the frame is "special" and indicates that no checksum was calculated and hence receiver should not verify the same. This special case seems to be only for UDP, not TCP though.

Fixes #160
This commit is contained in:
Srivats P 2015-10-07 20:40:31 +05:30
parent 7f224f61cd
commit 2cad79b87e

View File

@ -253,7 +253,11 @@ QVariant UdpProtocol::fieldData(int index, FieldAttrib attrib,
if (data.is_override_cksum())
cksum = data.cksum();
else
{
cksum = protocolFrameCksum(streamIndex, CksumTcpUdp);
if (cksum == 0)
cksum = 0xFFFF;
}
qDebug("UDP cksum = %hu", cksum);
break;
}