aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2022-01-27 22:41:25 -0500
committerJohn Thacker <johnthacker@gmail.com>2022-01-27 22:48:13 -0500
commit16ddc9ab19568f60024fedca1b4aed2e7661d064 (patch)
tree38c1ac01a85aa15ede81a59e96c043715d156bf2 /epan/dissectors/packet-rtp.c
parent6a99dacf54ec6fe2300056845f1f39c50a0b8a73 (diff)
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).
Diffstat (limited to 'epan/dissectors/packet-rtp.c')
-rw-r--r--epan/dissectors/packet-rtp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index 691fbb0482..ec3410f8ba 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -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);