From 7d43e3b24277fda2457a0476a16345dbaf5718be Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Wed, 9 Feb 2011 16:11:27 +0000 Subject: [PATCH] OLSR: fix bad usage of uninitialized m_routingAgentAddr. Spotted by chei_med--yahoo-fr on ns-3-users thread 'm_routingAgentAddr and OLSR' --- src/routing/olsr/model/olsr-routing-protocol.cc | 2 +- src/routing/olsr/model/olsr-routing-protocol.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/routing/olsr/model/olsr-routing-protocol.cc b/src/routing/olsr/model/olsr-routing-protocol.cc index a739b424c..c7d7ac9f1 100644 --- a/src/routing/olsr/model/olsr-routing-protocol.cc +++ b/src/routing/olsr/model/olsr-routing-protocol.cc @@ -2101,7 +2101,7 @@ RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, // If the main address of the 2-hop neighbor address == main address // of the receiving node, silently discard the 2-hop // neighbor address. - if (nb2hop_addr == m_routingAgentAddr) + if (nb2hop_addr == m_mainAddress) { NS_LOG_LOGIC ("Ignoring 2-hop neighbor (it is the node itself)"); continue; diff --git a/src/routing/olsr/model/olsr-routing-protocol.h b/src/routing/olsr/model/olsr-routing-protocol.h index 7239aa9e0..9afbd3ecc 100644 --- a/src/routing/olsr/model/olsr-routing-protocol.h +++ b/src/routing/olsr/model/olsr-routing-protocol.h @@ -131,9 +131,6 @@ private: Ptr m_hnaRoutingTable; EventGarbageCollector m_events; - - /// Address of the routing agent. - Ipv4Address m_routingAgentAddr; /// Packets sequence number counter. uint16_t m_packetSequenceNumber;