diff options
author | Anders Broman <anders.broman@ericsson.com> | 2008-12-13 22:00:22 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2008-12-13 22:00:22 +0000 |
commit | 3947676a844eaafb1760986faa3a588d3cd8758b (patch) | |
tree | 183bfa6ed2409aaa9cbf5def3acc82bf5af4bbf6 | |
parent | e2e9dc4197f9529a954ebf8be9b2ffb799eb982d (diff) | |
download | wireshark-3947676a844eaafb1760986faa3a588d3cd8758b.tar.gz wireshark-3947676a844eaafb1760986faa3a588d3cd8758b.tar.bz2 wireshark-3947676a844eaafb1760986faa3a588d3cd8758b.zip |
From Vincent Helfre:
Fix sndcp_xid_offset.
svn path=/trunk/; revision=26990
-rw-r--r-- | epan/dissectors/packet-gprs-llc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index d670abf92d..ef7997cb97 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -377,6 +377,7 @@ static void llc_gprs_dissect_xid(tvbuff_t *tvb, if (tmp == 0xB) /* L3 XID parameters, call the SNDCP-XID dissector */ { tvbuff_t *sndcp_xid_tvb; + guint8 sndcp_xid_offset; uinfo_field = proto_tree_add_text(xid_tree, tvb, location, item_len, "XID parameter Type: L3 parameters"); @@ -387,12 +388,21 @@ static void llc_gprs_dissect_xid(tvbuff_t *tvb, if (byte1 & 0x80) { proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len2, tvb, location+1, 1, byte2); proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_spare, tvb, location+1, 1, byte2); + sndcp_xid_offset = 2; } + else + { + sndcp_xid_offset = 1; + } if (xid_param_len) { - sndcp_xid_tvb = tvb_new_subset (tvb, location+2, xid_param_len, xid_param_len); + + sndcp_xid_tvb = tvb_new_subset (tvb, location+sndcp_xid_offset, xid_param_len, xid_param_len); + if(sndcp_xid_handle) - call_dissector(sndcp_xid_handle, sndcp_xid_tvb, pinfo, uinfo_tree); + { + call_dissector(sndcp_xid_handle, sndcp_xid_tvb, pinfo, uinfo_tree); + } } location += item_len; |