Skip to content

Commit

Permalink
fix clearing signaled RTCP IP before H.239 port detection
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Feb 28, 2024
1 parent 9ee88f3 commit 2e689a8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions ProxyChannel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ProxyChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion changes.txt
Original file line number Diff line number Diff line change
@@ -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
=========================
Expand Down

0 comments on commit 2e689a8

Please sign in to comment.