forked from osmocom/wireshark
LTE-RRC: fix dissection of GPRS container
Payload embedded in LTE message does not include the first byte identifying the message type. Let's prepend a fake one before calling the gsm_rlcmac dissector Change-Id: Ibcf9b52902474a556b55e9b0a076d09d341f868c Reviewed-on: https://code.wireshark.org/review/15642 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
7f2de76c63
commit
d77b8318e8
|
@ -384,7 +384,14 @@ MasterInformationBlock/schedulingInfoSIB1-BR-r13 TYPE=FT_UINT32 DISPLAY=BASE_DEC
|
|||
}
|
||||
} else {
|
||||
if (gsm_rlcmac_dl_handle) {
|
||||
lte_rrc_call_dissector(gsm_rlcmac_dl_handle, target_rat_msg_cont_tvb, actx->pinfo, subtree);
|
||||
tvbuff_t *gsm_rlcmac_dl_tvb = tvb_new_composite();
|
||||
guint8 *pd = (guint8 *) wmem_alloc(actx->pinfo->pool, 1);
|
||||
pd[0] = 0x40;
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, tvb_new_real_data(pd, 1, 1));
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, target_rat_msg_cont_tvb);
|
||||
tvb_composite_finalize(gsm_rlcmac_dl_tvb);
|
||||
add_new_data_source(actx->pinfo, gsm_rlcmac_dl_tvb, "GPRS DL control block");
|
||||
lte_rrc_call_dissector(gsm_rlcmac_dl_handle, gsm_rlcmac_dl_tvb, actx->pinfo, subtree);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -458,6 +465,13 @@ MasterInformationBlock/schedulingInfoSIB1-BR-r13 TYPE=FT_UINT32 DISPLAY=BASE_DEC
|
|||
case SI_OrPSI_GERAN_psi:
|
||||
/* PSI message */
|
||||
if (gsm_rlcmac_dl_handle) {
|
||||
tvbuff_t *gsm_rlcmac_dl_tvb = tvb_new_composite();
|
||||
guint8 *pd = (guint8 *) wmem_alloc(actx->pinfo->pool, 1);
|
||||
pd[0] = 0x40;
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, tvb_new_real_data(pd, 1, 1));
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, sys_info_list_tvb);
|
||||
tvb_composite_finalize(gsm_rlcmac_dl_tvb);
|
||||
add_new_data_source(actx->pinfo, gsm_rlcmac_dl_tvb, "GPRS DL control block");
|
||||
lte_rrc_call_dissector(gsm_rlcmac_dl_handle, sys_info_list_tvb, actx->pinfo, subtree);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -40331,7 +40331,14 @@ dissect_lte_rrc_T_targetRAT_MessageContainer(tvbuff_t *tvb _U_, int offset _U_,
|
|||
}
|
||||
} else {
|
||||
if (gsm_rlcmac_dl_handle) {
|
||||
lte_rrc_call_dissector(gsm_rlcmac_dl_handle, target_rat_msg_cont_tvb, actx->pinfo, subtree);
|
||||
tvbuff_t *gsm_rlcmac_dl_tvb = tvb_new_composite();
|
||||
guint8 *pd = (guint8 *) wmem_alloc(actx->pinfo->pool, 1);
|
||||
pd[0] = 0x40;
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, tvb_new_real_data(pd, 1, 1));
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, target_rat_msg_cont_tvb);
|
||||
tvb_composite_finalize(gsm_rlcmac_dl_tvb);
|
||||
add_new_data_source(actx->pinfo, gsm_rlcmac_dl_tvb, "GPRS DL control block");
|
||||
lte_rrc_call_dissector(gsm_rlcmac_dl_handle, gsm_rlcmac_dl_tvb, actx->pinfo, subtree);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -40399,6 +40406,13 @@ dissect_lte_rrc_SystemInfoListGERAN_item(tvbuff_t *tvb _U_, int offset _U_, asn1
|
|||
case SI_OrPSI_GERAN_psi:
|
||||
/* PSI message */
|
||||
if (gsm_rlcmac_dl_handle) {
|
||||
tvbuff_t *gsm_rlcmac_dl_tvb = tvb_new_composite();
|
||||
guint8 *pd = (guint8 *) wmem_alloc(actx->pinfo->pool, 1);
|
||||
pd[0] = 0x40;
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, tvb_new_real_data(pd, 1, 1));
|
||||
tvb_composite_append(gsm_rlcmac_dl_tvb, sys_info_list_tvb);
|
||||
tvb_composite_finalize(gsm_rlcmac_dl_tvb);
|
||||
add_new_data_source(actx->pinfo, gsm_rlcmac_dl_tvb, "GPRS DL control block");
|
||||
lte_rrc_call_dissector(gsm_rlcmac_dl_handle, sys_info_list_tvb, actx->pinfo, subtree);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue