diff --git a/ProxyChannel.cxx b/ProxyChannel.cxx index 8b177453..5102bd1e 100644 --- a/ProxyChannel.cxx +++ b/ProxyChannel.cxx @@ -13942,6 +13942,25 @@ void UDPProxySocket::SetRTCPDestination(const H245_UnicastAddress & dstAddr, con << " rSrc=" << AsString(rSrcIP, rSrcPort) << " rDest=" << AsString(rDestIP, rDestPort)); } +void UDPProxySocket::ZeroRTCPDestination() +{ + if (fDestIP != 0 && rDestIP != 0) { + fDestIP = 0; + fDestPort = 0; + } else { + rDestIP = 0; + rDestPort = 0; + } + + Address localaddr; + WORD localport = 0; + GetLocalAddress(localaddr, localport); + UnmapIPv4Address(localaddr); + PTRACE(7, "JW RTP after ZeroRTCPDestination on " << localport + << " fSrc=" << AsString(fSrcIP, fSrcPort) << " fDest=" << AsString(fDestIP, fDestPort) + << " rSrc=" << AsString(rSrcIP, rSrcPort) << " rDest=" << AsString(rDestIP, rDestPort)); +} + void UDPProxySocket::SetForwardDestination(const Address & srcIP, WORD srcPort, H245_UnicastAddress * dstAddr, callptr & call, bool onlySetDest, bool onlySetSrc) { Address localaddr; @@ -15693,6 +15712,10 @@ void RTPLogicalChannel::ZeroMediaControlChannelSource() { SrcIP = 0; SrcPort = 0; + if (rtcp) { + PTRACE(7, "JW RTP zero RTCP port from OLC"); + rtcp->ZeroRTCPDestination(); + } } void RTPLogicalChannel::SetMediaChannelSource(const H245_UnicastAddress & addr) diff --git a/ProxyChannel.h b/ProxyChannel.h index 75bacdf9..d63773d2 100644 --- a/ProxyChannel.h +++ b/ProxyChannel.h @@ -208,6 +208,7 @@ class UDPProxySocket : public UDPSocket, public ProxySocket { void UpdateSocketName(); void RemoveCallPtr() { PWaitAndSignal lock(m_callMutex); m_call = NULL; } void SetRTCPDestination(const H245_UnicastAddress & addr, const PIPSocket::Address & sourceIP, bool isUnidirectional); + void ZeroRTCPDestination(); void SetForwardDestination(const Address & srcIP, WORD srcPort, H245_UnicastAddress * dstAddr, callptr & call, bool onlySetDest, bool onlySetSrc); void SetReverseDestination(const Address & srcIP, WORD srcPort, H245_UnicastAddress * dstAddr, callptr & call, bool onlySetDest, bool onlySetSrc); typedef void (UDPProxySocket::*pMem)(const Address & srcIP, WORD srcPort, H245_UnicastAddress * dstAddr, callptr & call, bool onlySetDest, bool onlySetSrc); diff --git a/changes.txt b/changes.txt index a4d4bef8..af63521b 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,6 @@ Changes from 5.12 to 5.13 ========================= -- BUGFIX(ProxyChannel.cxx) check signaled RTP/RTCP source IP when doing port detection for H.239 +- BUGFIX(ProxyChannel.cxx) check signaled RTP/RTCP source IP when doing port detection for H.239, fix clearing IP before port detection Changes from 5.11 to 5.12 =========================