Export packets before dissecting them
This way even malformed packets are properly exported Change-Id: I923825459eea725d0a103810f3883906b95b3b21 Reviewed-on: https://code.wireshark.org/review/15259 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
f12ea80602
commit
49a83f56a4
|
@ -1227,6 +1227,10 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
|
|||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DIAMETER");
|
||||
|
||||
if (have_tap_listener(exported_pdu_tap)){
|
||||
export_diameter_pdu(pinfo,tvb);
|
||||
}
|
||||
|
||||
pi = proto_tree_add_item(tree,proto_diameter,tvb,0,-1,ENC_NA);
|
||||
diam_tree = proto_item_add_subtree(pi,ett_diameter);
|
||||
|
||||
|
@ -1422,10 +1426,6 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
|
|||
*/
|
||||
tap_queue_packet(diameter_tap, pinfo, diameter_pair);
|
||||
|
||||
if (have_tap_listener(exported_pdu_tap)){
|
||||
export_diameter_pdu(pinfo,tvb);
|
||||
}
|
||||
|
||||
return tvb_reported_length(tvb);
|
||||
}
|
||||
|
||||
|
|
|
@ -685,6 +685,13 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
|
|||
/* Display MEGACO in protocol column */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MEGACO");
|
||||
|
||||
/* Report this packet to the tap */
|
||||
if (!pinfo->flags.in_error_pkt) {
|
||||
if (have_tap_listener(exported_pdu_tap)) {
|
||||
export_megaco_pdu(pinfo, tvb);
|
||||
}
|
||||
}
|
||||
|
||||
/* Build the info tree if we've been given a root */
|
||||
/* Create megaco subtree */
|
||||
ti = proto_tree_add_item(tree,proto_megaco,tvb, 0, -1, ENC_NA);
|
||||
|
@ -1587,13 +1594,6 @@ nextcontext:
|
|||
tvb_raw_text_add(tvb, megaco_tree);
|
||||
}
|
||||
|
||||
/* Report this packet to the tap */
|
||||
if (!pinfo->flags.in_error_pkt) {
|
||||
if (have_tap_listener(exported_pdu_tap)) {
|
||||
export_megaco_pdu(pinfo, tvb);
|
||||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
|
|
@ -2718,6 +2718,10 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
|
|||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIP");
|
||||
|
||||
if (!pinfo->flags.in_error_pkt && have_tap_listener(exported_pdu_tap)) {
|
||||
export_sip_pdu(pinfo,tvb);
|
||||
}
|
||||
|
||||
DPRINT2(("------------------------------ dissect_sip_common ------------------------------"));
|
||||
|
||||
switch (line_type) {
|
||||
|
@ -3834,9 +3838,6 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info
|
|||
if (!pinfo->flags.in_error_pkt)
|
||||
{
|
||||
tap_queue_packet(sip_tap, pinfo, stat_info);
|
||||
if(have_tap_listener(exported_pdu_tap)){
|
||||
export_sip_pdu(pinfo,tvb);
|
||||
}
|
||||
}
|
||||
|
||||
if (datalen > 0) {
|
||||
|
|
Loading…
Reference in New Issue