diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 7c57f4937..018b45fcb 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -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 diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index 459eb40d0..24f33e207 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -521,6 +521,14 @@ RoutingProtocol::RouteInput (Ptr 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); } diff --git a/src/dsdv/model/dsdv-routing-protocol.cc b/src/dsdv/model/dsdv-routing-protocol.cc index b20ecc239..46c0ae524 100644 --- a/src/dsdv/model/dsdv-routing-protocol.cc +++ b/src/dsdv/model/dsdv-routing-protocol.cc @@ -467,6 +467,15 @@ RoutingProtocol::RouteInput (Ptr 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)) {