examples/mesh/mesh.cc
changeset 5464 050630fcf15e
parent 5369 86beb5869f67
child 6821 203367ae7433
--- a/examples/mesh/mesh.cc	Tue Oct 27 13:56:38 2009 +0300
+++ b/examples/mesh/mesh.cc	Tue Oct 27 18:43:45 2009 +0300
@@ -158,7 +158,16 @@
    * mesh point device
    */
   mesh = MeshHelper::Default ();
-  mesh.SetStackInstaller (m_stack, "Root", Mac48AddressValue (Mac48Address (m_root.c_str ())));
+  if (!Mac48Address (m_root.c_str ()).IsBroadcast ())
+    {
+      mesh.SetStackInstaller (m_stack, "Root", Mac48AddressValue (Mac48Address (m_root.c_str ())));
+    }
+  else
+    {
+      //If root is not set, we do not use "Root" attribute, because it
+      //is specified only for 11s
+      mesh.SetStackInstaller (m_stack);
+    }
   if (m_chan)
     {
       mesh.SetSpreadInterfaceChannels (MeshHelper::SPREAD_CHANNELS);