Skip to content

Commit 3694e8d

Browse files
committed
Ip2Nic: fix: Fall back to NR id if the UE has no LTE id
This is necessary to be able to handle NR-only UEs.
1 parent 5c77d27 commit 3694e8d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/simu5g/stack/ip2nic/Ip2Nic.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ void Ip2Nic::fromIpBs(Packet *pkt)
272272

273273
// handle "forwarding" of packets during handover
274274
MacNodeId destId = binder_->getMacNodeId(destAddr);
275+
if (destId == NODEID_NONE)
276+
destId = binder_->getNrMacNodeId(destAddr);
277+
275278
if (hoForwarding_.find(destId) != hoForwarding_.end()) {
276279
// data packet must be forwarded (via X2) to another eNB
277280
MacNodeId targetEnb = hoForwarding_.at(destId);
@@ -494,6 +497,8 @@ void Ip2Nic::receiveTunneledPacketOnHandover(Packet *datagram, MacNodeId sourceE
494497
const auto& hdr = datagram->peekAtFront<Ipv4Header>();
495498
const Ipv4Address& destAddr = hdr->getDestAddress();
496499
MacNodeId destId = binder_->getMacNodeId(destAddr);
500+
if (destId == NODEID_NONE)
501+
destId = binder_->getNrMacNodeId(destAddr);
497502
if (hoFromX2_.find(destId) == hoFromX2_.end()) {
498503
IpDatagramQueue queue;
499504
hoFromX2_[destId] = queue;

0 commit comments

Comments
 (0)