From Harald Welte:

lapdm dissector tries to defragment segment of different streams.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6659

svn path=/trunk/; revision=40842
daniel/osmux
Anders Broman 2012-02-04 15:44:10 +00:00
parent 84f869cb2e
commit dbed7b8aa0
2 changed files with 14 additions and 3 deletions

View File

@ -332,15 +332,17 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *gsmtap_tree = NULL;
tvbuff_t *payload_tvb, *l1h_tvb = NULL;
guint8 hdr_len, type, sub_type;
guint8 hdr_len, type, sub_type, timeslot, subslot;
guint16 arfcn;
len = tvb_length(tvb);
hdr_len = tvb_get_guint8(tvb, offset + 1) <<2;
type = tvb_get_guint8(tvb, offset + 2);
sub_type = tvb_get_guint8(tvb, offset + 12);
timeslot = tvb_get_guint8(tvb, offset + 3);
arfcn = tvb_get_ntohs(tvb, offset + 4);
sub_type = tvb_get_guint8(tvb, offset + 12);
subslot = tvb_get_guint8(tvb, offset + 14);
/* In case of a SACCH, there is a two-byte L1 header in front
* of the packet (see TS 04.04) */
@ -384,6 +386,10 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->p2p_dir = P2P_DIR_RECV;
}
/* Try to build an identifier of different 'streams' */
/* (AFCN _cant_ be used because of hopping */
pinfo->circuit_id = (timeslot << 3) | subslot;
if (tree) {
guint8 channel;
const char *channel_str;

View File

@ -289,15 +289,20 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
fragment_data *fd_m = NULL;
tvbuff_t *reassembled = NULL;
guint32 fragment_id;
gboolean save_fragmented = pinfo->fragmented;
pinfo->fragmented = m;
/* Rely on caller to provide a way to group fragments */
fragment_id = (pinfo->circuit_id << 4) | (sapi << 1) | pinfo->p2p_dir;
/* This doesn't seem the best way of doing it as doesn't
take N(S) into account, but N(S) isn't always 0 for
the first fragment!
*/
fd_m = fragment_add_seq_next (payload, 0, pinfo,
0, /* guint32 ID for fragments belonging together */
fragment_id, /* guint32 ID for fragments belonging together */
lapdm_fragment_table, /* list of message fragments */
lapdm_reassembled_table, /* list of reassembled messages */
/*n_s guint32 fragment sequence number */