--- a/src/internet-node/arp-ipv4-interface.cc Mon Jul 16 22:49:48 2007 -0700
+++ b/src/internet-node/arp-ipv4-interface.cc Wed Jul 18 11:43:39 2007 +0100
@@ -21,6 +21,7 @@
*/
#include "ns3/packet.h"
+#include "ns3/debug.h"
#include "ns3/composite-trace-resolver.h"
#include "ns3/node.h"
#include "ns3/net-device.h"
@@ -60,7 +61,19 @@
{
Ptr<ArpPrivate> arp = m_node->QueryInterface<ArpPrivate> (ArpPrivate::iid);
MacAddress hardwareDestination;
- bool found = arp->Lookup (p, dest, GetDevice (), &hardwareDestination);
+ bool found;
+
+ if (dest.IsBroadcast ())
+ {
+ hardwareDestination = GetDevice ()->GetBroadcast ();
+ found = true;
+ }
+ else
+ {
+ Ptr<ArpPrivate> arp = m_node->QueryInterface<ArpPrivate> (ArpPrivate::iid);
+ found = arp->Lookup (p, dest, GetDevice (), &hardwareDestination);
+ }
+
if (found)
{
GetDevice ()->Send (p, hardwareDestination, Ipv4L3Protocol::PROT_NUMBER);