aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-04-08 00:51:31 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-08 02:08:37 +0200
commit62ca400915b526dde0c5fab74fcd68e9c87c5bc8 (patch)
tree26bcacc0b8b0058eec53216be6fad2a67f9c820f
parentf6a41a627e17b135da09995ca2c8f4b8e3f1d0ae (diff)
lapdm: Hand B4 frames into a dissector supporting L2 pseudo-lengthlaforge/rsl-sacch
B4 frames have no length octet at L2 level, but instead a L2 pseudo length octet at L3. We must call the proper dissector for decoding them, and gsm_a_ccch supports L2 pseudo length. This addresses the LAPDm side of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14105 Ping-Bug: 14105 Change-Id: I5743dc6153a1adae60b8d9564f345861edc3fca4
-rw-r--r--epan/dissectors/packet-lapdm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c
index dc282a0..ce42252 100644
--- a/epan/dissectors/packet-lapdm.c
+++ b/epan/dissectors/packet-lapdm.c
@@ -48,6 +48,8 @@
void proto_register_lapdm(void);
+static dissector_handle_t b4_info_handle;
+
static int proto_lapdm = -1;
static int hf_lapdm_address = -1;
static int hf_lapdm_ea = -1;
@@ -365,6 +367,12 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
*/
pinfo->fragmented = save_fragmented;
}
+ else if (hdr_type == LAPDM_HDR_FMT_B4)
+ {
+ /* B4 frames have no length octet at L2 level, but instead a L2 pseudo length octet
+ * at L3. We must call the proper dissector for decoding them */
+ call_dissector(b4_info_handle, payload, pinfo, tree);
+ }
else
{
if (!PINFO_FD_VISITED(pinfo) && ((control & XDLC_S_U_MASK) == XDLC_U) && ((control & XDLC_U_MODIFIER_MASK) == XDLC_SABM)) {
@@ -540,6 +548,11 @@ proto_register_lapdm(void)
reassembly_table_register(&lapdm_reassembly_table,
&addresses_reassembly_table_functions);
+
+ /* B4 frames have no length octet at L2 level, but instead a L2 pseudo length octet
+ * at L3. We must call the proper dissector for decoding them, and gsm_a_ccch supports
+ * L2 pseudo length */
+ b4_info_handle = find_dissector_add_dependency("gsm_a_ccch", proto_lapdm);
}
/*