RFC 3849 - IPv6 Address Prefix Reserved for Documentation

This commit is contained in:
Tommaso Pecorella
2013-07-10 00:06:35 +02:00
parent f2cd231aec
commit 6550570e50
5 changed files with 31 additions and 0 deletions

View File

@@ -924,6 +924,14 @@ void Ipv6L3Protocol::IpForward (Ptr<const NetDevice> idev, Ptr<Ipv6Route> rtentr
NS_LOG_FUNCTION (this << rtentry << p << header);
NS_LOG_LOGIC ("Forwarding logic for node: " << m_node->GetId ());
// Drop RFC 3849 packets: 2001:db8::/32
if (header.GetDestinationAddress().IsDocumentation())
{
NS_LOG_WARN ("Received a packet for 2001:db8::/32 (documentation class). Drop.");
m_dropTrace (header, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv6> (), 0);
return;
}
// Forwarding
Ipv6Header ipHeader = header;
Ptr<Packet> packet = p->Copy ();