MAC NR: fix dissection of single byte padding CE
Change-Id: Icff0ffb4600bd778946ca879995edf710cc38e48 Reviewed-on: https://code.wireshark.org/review/28284 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
5ea2fe3844
commit
25d3c6270a
|
@ -1358,12 +1358,15 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PADDING_LCID:
|
case PADDING_LCID:
|
||||||
/* The rest of the PDU is padding */
|
{
|
||||||
proto_tree_add_item(subheader_tree, hf_mac_nr_padding, tvb, offset, -1, ENC_NA);
|
/* The rest of the PDU is padding */
|
||||||
write_pdu_label_and_info(pdu_ti, subheader_ti, pinfo, "(Padding %u bytes) ",
|
int pad_len = tvb_reported_length_remaining(tvb, offset);
|
||||||
tvb_reported_length_remaining(tvb, offset));
|
if (pad_len > 0)
|
||||||
/* Move to the end of the frame */
|
proto_tree_add_item(subheader_tree, hf_mac_nr_padding, tvb, offset, -1, ENC_NA);
|
||||||
offset = tvb_captured_length(tvb);
|
write_pdu_label_and_info(pdu_ti, subheader_ti, pinfo, "(Padding %u bytes) ", pad_len);
|
||||||
|
/* Move to the end of the frame */
|
||||||
|
offset = tvb_reported_length(tvb);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1720,11 +1723,15 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
||||||
write_pdu_label_and_info_literal(pdu_ti, subheader_ti, pinfo, "(Contention Resolution) ");
|
write_pdu_label_and_info_literal(pdu_ti, subheader_ti, pinfo, "(Contention Resolution) ");
|
||||||
break;
|
break;
|
||||||
case PADDING_LCID:
|
case PADDING_LCID:
|
||||||
write_pdu_label_and_info_literal(pdu_ti, subheader_ti, pinfo, "(Padding) ");
|
{
|
||||||
|
/* The rest of the PDU is padding */
|
||||||
/* The rest of the PDU is padding */
|
int pad_len = tvb_reported_length_remaining(tvb, offset);
|
||||||
proto_tree_add_item(subheader_tree, hf_mac_nr_padding, tvb, offset, -1, ENC_NA);
|
if (pad_len > 0)
|
||||||
offset = tvb_captured_length(tvb);
|
proto_tree_add_item(subheader_tree, hf_mac_nr_padding, tvb, offset, -1, ENC_NA);
|
||||||
|
write_pdu_label_and_info(pdu_ti, subheader_ti, pinfo, "(Padding %u bytes) ", pad_len);
|
||||||
|
/* Move to the end of the frame */
|
||||||
|
offset = tvb_reported_length(tvb);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue