From 2e151d685d3c0bdf374e081befbee4b406b84421 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 12 Mar 2021 10:07:07 -0500 Subject: [PATCH] TT#115400 explicitly disallow ptime in non-RTP SDPs Change-Id: Ib1e324861b6a88e1a2f80e4f37a8afa654923a77 (cherry picked from commit 2507838a681ede0d5750f300a4563e0673790cb4) --- daemon/sdp.c | 2 +- t/auto-daemon-tests.pl | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 1888b1b0f..2ed622ef0 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -2438,7 +2438,7 @@ int sdp_replace(struct sdp_chopper *chop, GQueue *sessions, struct call_monologu insert_crypto(call_media, chop, flags); insert_dtls(call_media, chop); - if (call_media->ptime) + if (proto_is_rtp(call_media->protocol) && call_media->ptime) chopper_append_printf(chop, "a=ptime:%i\r\n", call_media->ptime); if (MEDIA_ISSET(call_media, ICE) && call_media->ice_agent) { diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 1de891403..43714b0e1 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -6465,7 +6465,6 @@ a=T38FaxMaxBuffer:200 a=T38FaxMaxDatagram:180 a=T38FaxUdpEC:t38UDPRedundancy a=sendrecv -a=ptime:20 SDP (undef, $port_a) = answer('gh 766 reinvite', { @@ -6499,7 +6498,6 @@ a=T38FaxMaxBuffer:262 a=T38FaxMaxDatagram:176 a=T38FaxUdpEC:t38UDPRedundancy a=sendrecv -a=ptime:20 SDP snd($sock_b, $port_a, rtp(0, 4000, 5000, 0x4567, "\x88" x 160));