diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp index e774e572052..f06162c02f2 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp @@ -236,7 +236,12 @@ Locator_t& RTPSParticipantImpl::applyLocatorAdaptRule( { // This is a completely made up rule // It is transport responsibility to interpret this new port. - loc.port += m_att.port.participantIDGain; + uint16_t delta = m_att.port.participantIDGain; + if (metatraffic_unicast_port_ == loc.port) + { + metatraffic_unicast_port_ += delta; + } + loc.port += delta; return loc; }