GlobalRoutingManager: don't segfault for NetDevices that have no associated Channel (e.g. virtual NetDevices); just skip them.
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Thu, 15 May 2008 12:56:10 +0100
changeset 3020 953e6fc56bf0
parent 3019 4ac564369c63
child 3024 30ca8e7b5e89
child 3121 7cab987d8d5a
GlobalRoutingManager: don't segfault for NetDevices that have no associated Channel (e.g. virtual NetDevices); just skip them.
src/routing/global-routing/global-router-interface.cc
--- a/src/routing/global-routing/global-router-interface.cc	Thu May 15 12:54:28 2008 +0100
+++ b/src/routing/global-routing/global-router-interface.cc	Thu May 15 12:56:10 2008 +0100
@@ -638,6 +638,10 @@
 // router (to use OSPF lingo) is running.  
 //
           Ptr<Channel> ch = ndLocal->GetChannel();
+          if (ch == NULL)
+            {
+              continue;
+            }
           Ptr<NetDevice> ndRemote = GetAdjacent(ndLocal, ch);
 //
 // The adjacent net device is aggregated to a node.  We need to ask that net