src/devices/bridge/bridge-net-device.cc
changeset 3584 4eb48239b4dc
parent 3548 e5ab96db540e
child 3585 0404af4cacf0
--- a/src/devices/bridge/bridge-net-device.cc	Tue Sep 02 10:45:06 2008 -0700
+++ b/src/devices/bridge/bridge-net-device.cc	Tue Sep 02 11:28:03 2008 -0700
@@ -189,6 +189,14 @@
 BridgeNetDevice::AddBridgePort (Ptr<NetDevice> bridgePort)
 {
   NS_ASSERT (bridgePort != this);
+  if (!Mac48Address::IsMatchingType (bridgePort->GetAddress ()))
+    {
+      NS_FATAL_ERROR ("Device does not support eui 48 addresses: cannot be added to bridge.");
+    }
+  if (!bridgePort->SupportsSendFrom ())
+    {
+      NS_FATAL_ERROR ("Device does not support SendFrom: cannot be added to bridge.");
+    }
   if (m_address == Mac48Address ())
     {
       m_address = Mac48Address::ConvertFrom (bridgePort->GetAddress ());
@@ -411,7 +419,7 @@
 }
 
 bool
-BridgeNetDevice::SupportsPromiscuous () const
+BridgeNetDevice::SupportsSendFrom () const
 {
   return true;
 }