The message "Unable to determine outbound interface. No default route set"
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sun, 10 Feb 2008 22:34:04 +0000
changeset 2324 a3e10db411b9
parent 2323 176caa69af8a
child 2325 084b07dceafb
The message "Unable to determine outbound interface. No default route set" should not be fatal; just return false instead.
src/internet-node/ipv4-l3-protocol.cc
--- a/src/internet-node/ipv4-l3-protocol.cc	Sun Feb 10 13:19:07 2008 +0000
+++ b/src/internet-node/ipv4-l3-protocol.cc	Sun Feb 10 22:34:04 2008 +0000
@@ -895,9 +895,12 @@
   NS_LOG_LOGIC ("Using default unicast route");
   Ipv4Route *route = m_staticRouting->GetDefaultRoute ();
 
-  NS_ASSERT_MSG(route, 
-    "Ipv4L3Protocol::GetIfIndexForDestination (): "
-    "Unable to determine outbound interface.  No default route set");
+  if (route == NULL)
+    {
+      NS_LOG_LOGIC ("Ipv4L3Protocol::GetIfIndexForDestination (): "
+                    "Unable to determine outbound interface.  No default route set");
+      return false;
+    }
 
   ifIndex = route->GetInterface ();