RTP/RTCP: Create rtcp info when RFC 5761 multiplexing

The RTP dissector supports RFC 5761 multiplexing by default, always
passing payload types that conflict with RTCP to the RTCP dissector.
Thus, when a [S]RTP stream is set up by srtp_add_address, it should
pass along the information to the RTCP dissector so that the rtcp_info
and srtcp_info information is attached to the conversation as well.
Helps with DTLS-SRTP (#13193).
This commit is contained in:
John Thacker 2022-01-27 22:41:25 -05:00
parent 6a99dacf54
commit 16ddc9ab19
1 changed files with 12 additions and 0 deletions

View File

@ -54,6 +54,7 @@
#include <epan/decode_as.h>
#include "packet-rtp.h"
#include "packet-rtcp.h"
#include "packet-tcp.h"
#include <epan/rtp_pt.h>
@ -1107,6 +1108,17 @@ srtp_add_address(packet_info *pinfo, const port_type ptype, address *addr, int p
/* Set dissector */
if (ptype == PT_UDP) {
/* For RFC 5761 multiplexing, go ahead and create/update [S]RTCP
* info for the conversation, since this dissector will pass RTCP PTs
* to the RTCP dissector anyway.
* XXX: We only do this on UDP, as RFC 4571 specifies RTP and RTCP on
* different ports, but the RTCP dissector (like SDP) doesn't support
* RFC 4571 currently anyway.
*/
srtcp_add_address(pinfo, addr, port, other_port, setup_method, setup_frame_number, srtp_info);
/* Set the dissector afterwards, since RTCP will set the conversation
* to its dissector, but packets should go to RTP first.
*/
conversation_set_dissector(p_conv, rtp_handle);
} else if (ptype == PT_TCP) {
conversation_set_dissector(p_conv, rtp_rfc4571_handle);