From: g0dil Date: Thu, 17 Jan 2008 17:02:53 +0000 (+0000) Subject: Packets: BUGFIX: Remove DataPacket from Ip registry X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=5fc9de05bf3449d30a17f6e4c05115e7e101d228;p=senf.git Packets: BUGFIX: Remove DataPacket from Ip registry git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@620 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/DefaultBundle/IPv6Packet.cc b/Packets/DefaultBundle/IPv6Packet.cc index 7f4029c..8240f5b 100644 --- a/Packets/DefaultBundle/IPv6Packet.cc +++ b/Packets/DefaultBundle/IPv6Packet.cc @@ -42,9 +42,6 @@ namespace { senf::PacketRegistry::RegistrationProxy registerIPv6Packet2 (41); // IP6-in-IP(6) encapsulation - - senf::PacketRegistry::RegistrationProxy - registerNoNextHeader (59); } prefix_ void senf::IPv6PacketType::dump(packet p, std::ostream & os) @@ -66,7 +63,12 @@ prefix_ void senf::IPv6PacketType::dump(packet p, std::ostream & os) prefix_ void senf::IPv6PacketType::finalize(packet p) { p->length() << (p.size() - IPv6PacketParser::fixed_bytes); - p->nextHeader() << key(p.next(nothrow)); + try { + p->nextHeader() << key(p.next()); + } + catch (InvalidPacketChainException & ex) { + p->nextHeader() << 59; // No next header + } } ///////////////////////////////cc.e////////////////////////////////////////