From 309073109fa6e1c8c444a137d6578e9fcffc6c44 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 31 Mar 2022 21:32:43 -0700 Subject: [PATCH] [ip6] set priority on fragments when fragmenting an IPv6 datagram (#7555) This commit updates `Ip6::FragmentDatagram()` to set the priority on every fragment message to match the original IPv6 message. This ensures that as fragments are enqueued in the priority queue they follow the same priority as the original IPv6 message. --- src/core/net/ip6.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index f9cbc3409..d555b10ec 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -651,6 +651,7 @@ Error Ip6::FragmentDatagram(Message &aMessage, uint8_t aIpProto) fragmentHeader.SetOffset(offset); VerifyOrExit((fragment = NewMessage(0)) != nullptr, error = kErrorNoBufs); + IgnoreError(fragment->SetPriority(aMessage.GetPriority())); SuccessOrExit(error = fragment->SetLength(aMessage.GetOffset() + sizeof(fragmentHeader) + payloadFragment)); header.SetPayloadLength(payloadFragment + sizeof(fragmentHeader));