If no L4 protocol follows IPv6, set the IPv6 Next-Header field to 0x3B (IPv6-No-Next-Header) instead of leaving it at 0 which is interpreted as IPv6-Hop-By-Hop by the recipient and subsequent failure in parsing the frame

This commit is contained in:
Srivats P. 2015-01-13 18:51:21 +05:30
parent e2a4431418
commit f4f5214b7a

View File

@ -262,10 +262,17 @@ QVariant Ip6Protocol::fieldData(int index, FieldAttrib attrib,
case FieldValue:
case FieldFrameValue:
case FieldTextValue:
if (data.is_override_next_header())
if (data.is_override_next_header()) {
nextHdr = data.next_header();
else
}
else {
nextHdr = payloadProtocolId(ProtocolIdIp);
if ((nextHdr == 0)
&& next
&& (next->protocolIdType() == ProtocolIdNone)) {
nextHdr = 0x3b; // IPv6 No-Next-Header
}
}
break;
default:
nextHdr = 0; // avoid the 'maybe used unitialized' warning