bug 861: Log drop traces for forwarding failures into IPv4 and IPv6 ascii traces
--- a/CHANGES.html Mon May 10 14:09:23 2010 +0100
+++ b/CHANGES.html Sat May 15 16:46:47 2010 -0700
@@ -44,6 +44,21 @@
us a note on ns-developers mailing list. </p>
<hr>
+<h1>Changes from ns-3.8 to ns-3.9</h1>
+
+<h2>Changes to build system:</h2>
+
+<h2>New API:</h2>
+
+<h2>Changes to existing API:</h2>
+
+<h2>Changed behavior:</h2>
+<ul>
+<li><b>Drop trace logged for Ipv4/6 forwarding failure:</b> Fixed bug 861; this
+will add ascii traces (drops) in Ipv4 and Ipv6 traces for forwarding failures
+</ul>
+
+<hr>
<h1>Changes from ns-3.7 to ns-3.8</h1>
<h2>Changes to build system:</h2>
--- a/RELEASE_NOTES Mon May 10 14:09:23 2010 +0100
+++ b/RELEASE_NOTES Sat May 15 16:46:47 2010 -0700
@@ -9,6 +9,35 @@
Consult the file CHANGES.html for more detailed information about changed
API and behavior across ns-3 releases.
+Release 3.9
+===========
+
+Availability
+------------
+This release is not yet available.
+
+Supported platforms
+-------------------
+ns-3.9 has been tested on the following platforms:
+
+Not all ns-3 options are available on all platforms; consult the
+wiki for more information:
+http://www.nsnam.org/wiki/index.php/Installation
+
+New user-visible features
+-------------------------
+
+Bugs fixed
+----------
+The following lists many of the bugs that were fixed since ns-3.7, in
+many cases referencing the Bugzilla bug number
+
+ - bug 861 - Forwarding drops (due to no route found) were not being logged
+ in IPv4 or IPv6 ascii traces
+
+Known issues
+------------
+
Release 3.8
===========
--- a/src/internet-stack/ipv4-l3-protocol.cc Mon May 10 14:09:23 2010 +0100
+++ b/src/internet-stack/ipv4-l3-protocol.cc Sat May 15 16:46:47 2010 -0700
@@ -484,12 +484,17 @@
}
NS_ASSERT_MSG (m_routingProtocol != 0, "Need a routing protocol object to process packets");
- m_routingProtocol->RouteInput (packet, ipHeader, device,
+ if (! m_routingProtocol->RouteInput (packet, ipHeader, device,
MakeCallback (&Ipv4L3Protocol::IpForward, this),
MakeCallback (&Ipv4L3Protocol::IpMulticastForward, this),
MakeCallback (&Ipv4L3Protocol::LocalDeliver, this),
MakeCallback (&Ipv4L3Protocol::RouteInputError, this)
- );
+ ))
+ {
+ NS_LOG_WARN ("No route found for forwarding packet. Drop.");
+ m_dropTrace (ipHeader, packet, DROP_NO_ROUTE, m_node->GetObject<Ipv4> (), interface);
+ }
+
}
--- a/src/internet-stack/ipv6-l3-protocol.cc Mon May 10 14:09:23 2010 +0100
+++ b/src/internet-stack/ipv6-l3-protocol.cc Sat May 15 16:46:47 2010 -0700
@@ -728,12 +728,15 @@
}
}
- m_routingProtocol->RouteInput (packet, hdr, device,
+ if (! m_routingProtocol->RouteInput (packet, hdr, device,
MakeCallback (&Ipv6L3Protocol::IpForward, this),
MakeCallback (&Ipv6L3Protocol::IpMulticastForward, this),
MakeCallback (&Ipv6L3Protocol::LocalDeliver, this),
- MakeCallback (&Ipv6L3Protocol::RouteInputError, this)
- );
+ MakeCallback (&Ipv6L3Protocol::RouteInputError, this)))
+ {
+ NS_LOG_WARN ("No route found for forwarding packet. Drop.");
+ m_dropTrace (hdr, packet, DROP_NO_ROUTE, interface);
+ }
}
void Ipv6L3Protocol::SendRealOut (Ptr<Ipv6Route> route, Ptr<Packet> packet, Ipv6Header const& ipHeader)