File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/simu5g/corenetwork/gtp Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,11 @@ void GtpUserX2::handleFromStack(Packet *pkt)
6161{
6262 // extract destination from the message
6363 auto x2Msg = pkt->peekAtFront <LteX2Message>();
64- X2NodeId destId = MacNodeId (x2Msg->getDestinationId ());
65- X2NodeId srcId = MacNodeId (x2Msg->getSourceId ());
64+ X2NodeId destId = x2Msg->getDestinationId ();
65+ X2NodeId srcId = x2Msg->getSourceId ();
66+ ASSERT (getNodeTypeById (srcId) == ENODEB);
67+ ASSERT (getNodeTypeById (destId) == ENODEB);
68+ ASSERT (srcId != destId);
6669 EV << " GtpUserX2::handleFromStack - Received a LteX2Message with destId[" << destId << " ]" << endl;
6770
6871 auto gtpMsg = makeShared<GtpUserMsg>();
@@ -71,6 +74,7 @@ void GtpUserX2::handleFromStack(Packet *pkt)
7174
7275 // get the IP address of the destination X2 interface from the Binder
7376 L3Address peerAddress = binder_->getX2PeerAddress (srcId, destId);
77+ ASSERT (!peerAddress.isUnspecified ());
7478 socket_.sendTo (pkt, peerAddress, tunnelPeerPort_);
7579}
7680
You can’t perform that action at this time.
0 commit comments