From e22425b80d8914f80ace6cc0a7b6190582cffbce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Gonz=C3=A1lez=20L=C3=B3pez?= Date: Sun, 31 May 2026 20:40:21 +0200 Subject: [PATCH 1/2] [FIX] [IPv6] Use correct destination address so packets with multicast destination are properly handled --- src/inet/networklayer/ipv6/Ipv6.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/inet/networklayer/ipv6/Ipv6.cc b/src/inet/networklayer/ipv6/Ipv6.cc index a45f4fdd267..eb78b6c3211 100644 --- a/src/inet/networklayer/ipv6/Ipv6.cc +++ b/src/inet/networklayer/ipv6/Ipv6.cc @@ -401,14 +401,15 @@ void Ipv6::handleMessageFromHL(Packet *packet) void Ipv6::datagramLocalOut(Packet *packet, const NetworkInterface *destIE, Ipv6Address requestedNextHopAddress) { const auto& ipv6Header = packet->peekAtFront(); + // route packet if (destIE != nullptr) - fragmentPostRouting(packet, destIE, MacAddress::BROADCAST_ADDRESS, true); // FIXME what MAC address to use? + fragmentPostRouting(packet, destIE, ipv6Header->getDestAddress(), true); else if (!ipv6Header->getDestAddress().isMulticast()) routePacket(packet, destIE, nullptr, requestedNextHopAddress, true); else routeMulticastPacket(packet, destIE, nullptr, true); -} + } void Ipv6::routePacket(Packet *packet, const NetworkInterface *destIE, const NetworkInterface *fromIE, Ipv6Address requestedNextHopAddress, bool fromHL) { From 97aa9fb9bfbbfc7f239f0e4fe29de0553fa081a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Gonz=C3=A1lez=20L=C3=B3pez?= Date: Sun, 31 May 2026 20:49:38 +0200 Subject: [PATCH 2/2] Remove extra space --- src/inet/networklayer/ipv6/Ipv6.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inet/networklayer/ipv6/Ipv6.cc b/src/inet/networklayer/ipv6/Ipv6.cc index eb78b6c3211..e013a4f0781 100644 --- a/src/inet/networklayer/ipv6/Ipv6.cc +++ b/src/inet/networklayer/ipv6/Ipv6.cc @@ -409,7 +409,7 @@ void Ipv6::datagramLocalOut(Packet *packet, const NetworkInterface *destIE, Ipv6 routePacket(packet, destIE, nullptr, requestedNextHopAddress, true); else routeMulticastPacket(packet, destIE, nullptr, true); - } +} void Ipv6::routePacket(Packet *packet, const NetworkInterface *destIE, const NetworkInterface *fromIE, Ipv6Address requestedNextHopAddress, bool fromHL) {