From acdccfaac2906c690d58f279378f4c6413c1f6cd Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Sat, 4 Feb 2012 13:54:15 +0100 Subject: [PATCH] Bug 1357 - IPv6 fragmentation fails due to checks about malformed extensions --- RELEASE_NOTES | 1 + src/internet/model/ipv6-l3-protocol.cc | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index cbe7ef562..a6d775359 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -26,6 +26,7 @@ Bugs fixed ---------- - bug 1319 - Fix Ipv6RawSocketImpl Icmpv6 filter - bug 1318 - Asserts for IPv6 malformed packets + - bug 1357 - IPv6 fragmentation fails due to checks about malformed extensions Known issues ------------ diff --git a/src/internet/model/ipv6-l3-protocol.cc b/src/internet/model/ipv6-l3-protocol.cc index 96ea39f7b..ce0ccf65c 100644 --- a/src/internet/model/ipv6-l3-protocol.cc +++ b/src/internet/model/ipv6-l3-protocol.cc @@ -969,15 +969,16 @@ void Ipv6L3Protocol::LocalDeliver (Ptr packet, Ipv6Header const& i if (ipv6Extension) { uint8_t nextHeaderStep = 0; + uint8_t curHeader = nextHeader; nextHeaderStep = ipv6Extension->Process (p, nextHeaderPosition, ip, dst, &nextHeader, isDropped); nextHeaderPosition += nextHeaderStep; - NS_ASSERT_MSG (nextHeaderStep != 0, "Zero-size IPv6 Option Header, aborting"); - if (isDropped) { return; } + NS_ASSERT_MSG (nextHeaderStep != 0 || curHeader == Ipv6Header::IPV6_EXT_FRAGMENTATION, + "Zero-size IPv6 Option Header, aborting" << *packet ); } else {