Hi, We found out that,
Request: SETUP rtsp://...:554/proxyStream/track1 RTSP/1.0\r\n CSeq: 17410\r\n Transport: RTP/AVP;multicast User-Agent: RTSP Agent\r\n \r\n ...halts all parallel RTP streams from same proxy server (and when client repeatedly tries to reconnect paralyzes streaming completely). It seems that RTSPServer.cpp doesn't validate clientRTPPortNum on client setup and patch below prevents the problem. I guess that there should be implemented better parameter validation? --- a/liveMedia/RTSPServer.cpp +++ b/liveMedia/RTSPServer.cpp @@ -299,7 +299,7 @@ void RTSPServer::RTSPClientConnection @@ -112,39 +112,7 @@ index 1c33dd7..60ea00c 100644 } void RTSPServer::RTSPClientConnection -@@ -1456,16 +1456,21 @@ void RTSPServer::RTSPClientSession - } else { - switch (streamingMode) { - case RTP_UDP: { -- snprintf((char*)ourClientConnection->fResponseBuffer, sizeof ourClientConnection->fResponseBuffer, -- "RTSP/1.0 200 OK\r\n" -- "CSeq: %s\r\n" -- "%s" -- "Transport: RTP/AVP;unicast;destination=%s;source=%s;client_port=%d-%d;server_port=%d-%d\r\n" -- "Session: %08X%s\r\n\r\n", -- ourClientConnection->fCurrentCSeq, -- dateHeader(), -- destAddrStr.val(), sourceAddrStr.val(), ntohs(clientRTPPort.num()), ntohs(clientRTCPPort.num()), ntohs(serverRTPPort.num()), ntohs(serverRTCPPort.num()), -- fOurSessionId, timeoutParameterString); -+ if (clientRTPPortNum != 0) { -+ snprintf((char*)ourClientConnection->fResponseBuffer, sizeof ourClientConnection->fResponseBuffer, -+ "RTSP/1.0 200 OK\r\n" -+ "CSeq: %s\r\n" -+ "%s" -+ "Transport: RTP/AVP;unicast;destination=%s;source=%s;client_port=%d-%d;server_port=%d-%d\r\n" -+ "Session: %08X%s\r\n\r\n", -+ ourClientConnection->fCurrentCSeq, -+ dateHeader(), -+ destAddrStr.val(), sourceAddrStr.val(), ntohs(clientRTPPort.num()), ntohs(clientRTCPPort.num()), ntohs(serverRTPPort.num()), ntohs(serverRTCPPort.num()), -+ fOurSessionId, timeoutParameterString); -+ } else { -+ // client port needs to be defined -+ ourClientConnection->handleCmd_unsupportedTransport(); -+ } - break; - } - case RTP_TCP: { -@@ -1582,7 +1587,7 @@ void RTSPServer::RTSPClientSession -- Best regards, Juho Ylikorpi Node Solutions Ltd Itäinen Pitkäkatu 4 C (PharmaCity) FI-20520 TURKU FINLAND Tel. +358 2 4802 8550 Mob. +358 40 544 7406 http://node.solutions/ juho.ylikorpi@node.solutions<mailto:juho.ylikorpi@node.solutions>
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel