internet: (fixes #2402) IPv4 Interface forwarding state is not honored
This commit is contained in:
@@ -61,6 +61,7 @@ Bugs fixed
|
||||
- Bug 2396 - move utility functions to WifiPhy
|
||||
- Bug 2397 - add backoff and cw tracing to EDCA
|
||||
- Bug 2398 - add SNR tag to beacons and probe responses
|
||||
- Bug 2402 - IPv4 Interface forwarding state is not honored
|
||||
- Bug 2406 - Poor 802.11g performance in ad-hoc mode
|
||||
- Bug 2414 - UdpSocket doesn't call NotifyConnectionFailed
|
||||
- Bug 2419 - BsmApplication should use RecvFrom and not SocketAddressTag
|
||||
|
||||
@@ -521,6 +521,14 @@ RoutingProtocol::RouteInput (Ptr<const Packet> p, const Ipv4Header &header,
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if input device supports IP forwarding
|
||||
if (m_ipv4->IsForwarding (iif) == false)
|
||||
{
|
||||
NS_LOG_LOGIC ("Forwarding disabled for this interface");
|
||||
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Forwarding
|
||||
return Forwarding (p, header, ucb, ecb);
|
||||
}
|
||||
|
||||
@@ -467,6 +467,15 @@ RoutingProtocol::RouteInput (Ptr<const Packet> p,
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if input device supports IP forwarding
|
||||
if (m_ipv4->IsForwarding (iif) == false)
|
||||
{
|
||||
NS_LOG_LOGIC ("Forwarding disabled for this interface");
|
||||
ecb (p, header, Socket::ERROR_NOROUTETOHOST);
|
||||
return true;
|
||||
}
|
||||
|
||||
RoutingTableEntry toDst;
|
||||
if (m_routingTable.LookupRoute (dst,toDst))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user