diff options
author | Michal Pazdera <michal.pazdera@gmail.com> | 2015-09-08 08:34:41 +0200 |
---|---|---|
committer | ronnie sahlberg <ronniesahlberg@gmail.com> | 2015-09-11 16:16:03 +0000 |
commit | ea8109e958eb9e7050eafe3e91fe47091f7f0e4a (patch) | |
tree | 49cc6222db98118a26a6bd70125323b21ff17da3 /epan/dissectors/packet-sdp.c | |
parent | 12176f45d9df961e28eb3bcbd0d9b2139a49e082 (diff) |
Bug fix of missing "RTP arrow" in the Flow graph of VoIP calls.
This commit fixes bug that I have encountred in the Flow graphs of VoIP calls.
Where the RTP communication is shown only in one direction. This happens
because the packet-sip.c dissector is unable to find SIP/SDP setup frame from
the recivers side and sets the setup frame to 0. Now if no frame is found the
number of current frame is used. I have checked the previous versions and in
ver 1.8.12 it worked properly (same as after this change).
Note: I am not sure if the 1.8.12 is the last version where this was working
properly.
Change-Id: Ibb3cf85cbce03f80a2492eeae6cf64acddc439f5
Reviewed-on: https://code.wireshark.org/review/10440
Reviewed-by: Tomáš Kukosa <tomas.kukosa@unify.com>
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-sdp.c')
-rw-r--r-- | epan/dissectors/packet-sdp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index 659c813ede..8740f07500 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -1911,6 +1911,7 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex gint start_transport_info_count = 0; transport_info_t* transport_info = NULL; disposable_media_info_t media_info; + int establish_frame = 0; struct srtp_info *srtp_info = NULL; @@ -2086,6 +2087,13 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex if (!delay || ((exchange_type == SDP_EXCHANGE_ANSWER_ACCEPT) && (transport_info->sdp_status == SDP_EXCHANGE_OFFER))) { + /* If no request_frame number has been found use this frame's number */ + if (request_frame == 0) { + establish_frame = pinfo->fd->num; + } else { + establish_frame = request_frame; + } + for (n = 0; n <= transport_info->media_count; n++) { guint32 current_rtp_port = 0; @@ -2108,7 +2116,7 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex DINDENT(); /* srtp_add_address and rtp_add_address are given the request_frame's not this frame's number, because that's where the RTP flow started, and thus conversation needs to check against */ - srtp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n], 0, "SDP", request_frame, + srtp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n], 0, "SDP", establish_frame, (transport_info->proto_bitmask[n] & SDP_VIDEO) ? TRUE : FALSE, transport_info->media[n].rtp_dyn_payload, srtp_info); DENDENT(); @@ -2116,7 +2124,7 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex DPRINT(("calling rtp_add_address, channel=%d, media_port=%d", n, transport_info->media_port[n])); DINDENT(); - rtp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n], 0, "SDP", request_frame, + rtp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n], 0, "SDP", establish_frame, (transport_info->proto_bitmask[n] & SDP_VIDEO) ? TRUE : FALSE, transport_info->media[n].rtp_dyn_payload); DENDENT(); @@ -2130,13 +2138,13 @@ setup_sdp_transport(tvbuff_t *tvb, packet_info *pinfo, enum sdp_exchange_type ex DPRINT(("calling rtcp_add_address, channel=%d, media_port=%d", n, transport_info->media_port[n]+1)); DINDENT(); - srtcp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n]+1, 0, "SDP", request_frame, srtp_info); + srtcp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n]+1, 0, "SDP", establish_frame, srtp_info); DENDENT(); } else { DPRINT(("calling rtcp_add_address, channel=%d, media_port=%d", n, transport_info->media_port[n]+1)); DINDENT(); - rtcp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n]+1, 0, "SDP", request_frame); + rtcp_add_address(pinfo, &transport_info->src_addr[n], transport_info->media_port[n]+1, 0, "SDP", establish_frame); DENDENT(); } } |