diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 5d168260d..f8422321b 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -515,12 +515,12 @@ int osmux_enable_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn, * used to reconstruct the RTP flow from osmux. The RTP SSRC is * allocated based on the circuit ID (conn_net->osmux.cid), which is unique * in the local scope to the BSC/BSC-NAT. We use it to divide the RTP - * SSRC space (2^32) by the 256 possible circuit IDs, then randomly + * SSRC space (2^32) by the OSMUX_CID_MAX + 1 possible circuit IDs, then randomly * select one value from that window. Thus, we have no chance to have * overlapping RTP SSRC traveling to the BTSes behind the BSC, * similarly, for flows traveling to the MSC. */ - static const uint32_t rtp_ssrc_winlen = UINT32_MAX / 256; + static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1); uint16_t osmux_dummy = endp->cfg->osmux_dummy; /* Check if osmux is enabled for the specified connection */