From b4511f6e70c7b318847df6efa5a46dfd3bf01d26 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Tue, 15 Dec 2009 18:28:01 -0800 Subject: [PATCH] Fix debug compilation for all platforms --- src/internet-stack/arp-l3-protocol.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/internet-stack/arp-l3-protocol.cc b/src/internet-stack/arp-l3-protocol.cc index f11d5e191..3e2bf7c26 100644 --- a/src/internet-stack/arp-l3-protocol.cc +++ b/src/internet-stack/arp-l3-protocol.cc @@ -315,21 +315,18 @@ ArpL3Protocol::SendArpRequest (Ptr cache, Ipv4Address to) ArpHeader arp; // need to pick a source address; use routing implementation to select Ptr ipv4 = m_node->GetObject (); - ipv4->GetInterfaceForDevice (cache->GetDevice ()); - NS_ASSERT (interface >= 0); + Ptr device = cache->GetDevice (); + NS_ASSERT (device != 0); Ipv4Header header; header.SetDestination (to); Ptr packet = Create (); - Ipv4Address source = ipv4->SelectSourceAddress (cache->GetDevice (), to, Ipv4InterfaceAddress::GLOBAL); + Ipv4Address source = ipv4->SelectSourceAddress (device, to, Ipv4InterfaceAddress::GLOBAL); NS_LOG_LOGIC ("ARP: sending request from node "<GetId ()<< - " || src: " << cache->GetDevice ()->GetAddress () << - " / " << source << - " || dst: " << cache->GetDevice ()->GetBroadcast () << - " / " << to); - arp.SetRequest (cache->GetDevice ()->GetAddress (), source, - cache->GetDevice ()->GetBroadcast (), to); + " || src: " << device->GetAddress () << " / " << source << + " || dst: " << device->GetBroadcast () << " / " << to); + arp.SetRequest (device->GetAddress (), source, device->GetBroadcast (), to); packet->AddHeader (arp); - cache->GetDevice ()->Send (packet, cache->GetDevice ()->GetBroadcast (), PROT_NUMBER); + cache->GetDevice ()->Send (packet, device->GetBroadcast (), PROT_NUMBER); } void