internet: (fixes #2438) Routing must not chain-process packets coming from a non-forwarding interface

This commit is contained in:
Tommso Pecorella
2016-06-13 00:11:15 +02:00
parent c9b50f9b04
commit 70fc877f81
10 changed files with 11 additions and 8 deletions

View File

@@ -70,6 +70,7 @@ Bugs fixed
- Bug 2427 - 802.11ac selects wrong slot duration
- Bug 2433 - Bic does not copy private parameters
- Bug 2436 - SendBlockAckAfterAmpdu is called even if the A-MPDU frame is not addressed to the station
- Bug 2438 - Routing protocols should stop processing packets coming from a non-forwarding interface
Known issues
------------

View File

@@ -513,7 +513,7 @@ Ipv4GlobalRouting::RouteInput (Ptr<const Packet> p, const Ipv4Header &header, P
{
NS_LOG_LOGIC ("Forwarding disabled for this interface");
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
return false;
return true;
}
// Next, try to find a route
NS_LOG_LOGIC ("Unicast destination- looking up global route");

View File

@@ -1396,6 +1396,8 @@ Ipv4L3Protocol::RouteInputError (Ptr<const Packet> p, const Ipv4Header & ipHeade
NS_LOG_FUNCTION (this << p << ipHeader << sockErrno);
NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno);
m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject<Ipv4> (), 0);
// \todo Send an ICMP no route.
}
void

View File

@@ -161,7 +161,7 @@ Ipv4ListRouting::RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<
{
NS_LOG_LOGIC ("Forwarding disabled for this interface");
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
return false;
return true;
}
// Next, try to find a route
// If we have already delivered a packet locally (e.g. multicast)

View File

@@ -543,7 +543,7 @@ Ipv4StaticRouting::RouteInput (Ptr<const Packet> p, const Ipv4Header &ipHeader,
{
NS_LOG_LOGIC ("Forwarding disabled for this interface");
ecb (p, ipHeader, Socket::ERROR_NOROUTETOHOST);
return false;
return true;
}
// Next, try to find a route
Ptr<Ipv4Route> rtentry = LookupStatic (ipHeader.GetDestination ());

View File

@@ -1230,7 +1230,7 @@ void Ipv6L3Protocol::IpForward (Ptr<const NetDevice> idev, Ptr<Ipv6Route> rtentr
NS_LOG_LOGIC ("Forwarding logic for node: " << m_node->GetId ());
// Drop RFC 3849 packets: 2001:db8::/32
if (header.GetDestinationAddress().IsDocumentation())
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);

View File

@@ -115,7 +115,7 @@ Ipv6ListRouting::RouteInput (Ptr<const Packet> p, const Ipv6Header &header, Ptr<
{
NS_LOG_LOGIC ("Forwarding disabled for this interface");
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
return false;
return true;
}
// We disable error callback for the called protocols.

View File

@@ -623,7 +623,7 @@ bool Ipv6StaticRouting::RouteInput (Ptr<const Packet> p, const Ipv6Header &heade
{
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
}
return false;
return true;
}
// Next, try to find a route
NS_LOG_LOGIC ("Unicast destination");

View File

@@ -268,7 +268,7 @@ bool Rip::RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const N
{
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
}
return false;
return true;
}
// Next, try to find a route
NS_LOG_LOGIC ("Unicast destination");

View File

@@ -244,7 +244,7 @@ bool RipNg::RouteInput (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const
{
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
}
return false;
return true;
}
// Next, try to find a route
NS_LOG_LOGIC ("Unicast destination");