Hi all,
Gerrit Renker fixed a bug in DCCP dissector about long timestamps.
(bad offsets)
He wrote:
attached is a patch which updates the offsets of the timestamps.
I have verified this against [RFC 4342, sec. 13]
and it seems correct.
I have verified it as well, it's correct.
You find attached a svn diff (rev 20554), please apply.
Ciao
FF
Index: packet-dcp.c
===================================================================
--- packet-dcp.c (revision 20554)
+++ packet-dcp.c (working copy)
@@ -44,6 +44,10 @@
* (unlike UDP/packet-udp, from which the code stems,
* zero checksums are illegal in DCCP (as in TCP))
* (Gerrit Renker)
+ *
+ * Gen 29, 2007: updates the offsets of the timestamps to be
+ * compliant to (cf. RFC 4342, sec. 13).
+ * (Gerrit Renker)
*/
#ifdef HAVE_CONFIG_H
@@ -499,14 +503,14 @@
proto_tree_add_uint(dcp_options_tree, hf_dcp_timestamp_echo, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
- proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 4, 2,
- tvb_get_ntohs(tvb, offset + 4));
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 6, 2,
+ tvb_get_ntohs(tvb, offset + 6));
} else if (option_len==10) {
proto_tree_add_uint(dcp_options_tree, hf_dcp_timestamp_echo, tvb, offset + 2, 4,
tvb_get_ntohl(tvb, offset + 2));
- proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 4, 4,
- tvb_get_ntohl(tvb, offset + 4));
+ proto_tree_add_uint(dcp_options_tree, hf_dcp_elapsed_time, tvb, offset + 6, 4,
+ tvb_get_ntohl(tvb, offset + 6));
} else
proto_tree_add_text(dcp_options_tree, tvb, offset, option_len, "Wrong Timestamp Echo length");
break;