forked from osmocom/wireshark
Don't use g_warning() - either you have a dissector bug, and should use
one of the macros to report that, or you have a problem with the packet, in which case you should note that in the protocol tree, or you have something you don't understand, in which case you should dissect whatever of it you do understand and put something appropriate, if possible, into the protocol tree for the rest. (And, if the length isn't right, there's not much you can do about it - you have to trust the length, and manage to fail somewhere else.) svn path=/trunk/; revision=35408
This commit is contained in:
parent
802308ca01
commit
b711e23baa
|
@ -387,9 +387,20 @@ dissect_mip_extensions(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|||
|
||||
break;
|
||||
default:
|
||||
g_warning("Unknown type(%u)! I hope the length is right (%u)",
|
||||
type, length);
|
||||
offset += length + 2;
|
||||
/* type */
|
||||
proto_tree_add_item(mip_tree, hf_icmp_mip_type, tvb, offset,
|
||||
1, FALSE);
|
||||
offset++;
|
||||
/* length */
|
||||
proto_tree_add_item(mip_tree, hf_icmp_mip_length, tvb, offset,
|
||||
1, FALSE);
|
||||
offset++;
|
||||
/* data, if any */
|
||||
if (length != 0) {
|
||||
proto_tree_add_text(mip_tree, tvb, offset, length, "Contents");
|
||||
offset+=length;
|
||||
}
|
||||
|
||||
break;
|
||||
} /* switch type */
|
||||
} /* end while */
|
||||
|
|
Loading…
Reference in New Issue